Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Whenever I activate a sandboxed solution (WSP) for a site, I get an unable to load assembly group message. The solution uses PublishingNavigation, and the site (and subsites) has got publishing enabled. Problem is, it works in the development environment just not the live one. The error in detail (after turning on debugging, call stack and turning off custom errors) is:

Specified argument was out of the range of valid values. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.]

[SPUserCodeExecutionPipelineFailedException: Unable to load assembly group. The user assembly group provider threw an exception while trying to provide user assemblies for the specified assembly group.]
   System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10258154
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +539
   Microsoft.SharePoint.Administration.ISPUserCodeExecutionHostProxy.Execute(Type userCodeWrapperType, Guid siteCollectionId, SPUserToken userToken, String affinityBucketName, SPUserCodeExecutionContext executionContext) +0
   Microsoft.SharePoint.UserCode.SPUserCodeExecutionManager.Execute(Type userCodeWrapperType, SPSite site, SPUserCodeExecutionContext executionContext) +21403441
   Microsoft.SharePoint.Administration.<>c__DisplayClass1.<DoSPUserFeatureCallout>b__0() +83
   Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) +27609494
   Microsoft.SharePoint.Administration.SPFeatureDefinition.DoSPUserFeatureCallout(SPSite site, SPWeb web, SPFeatureCallOutOperation operation, String solutionHash, String solutionValidatorHash, String solutionValidationErrorUrl, String solutionValidationErrorMessage, String customActionName, IDictionary`2 parameters) +1291
   Microsoft.SharePoint.Administration.SPFeatureDefinition.DoInstallationCallout(SPSite site, String solutionHash, Boolean fInstall) +625
   Microsoft.SharePoint.Administration.SPFeatureDefinition.Install(SPSite site, String solutionHash) +444
   Microsoft.SharePoint.Administration.SPFeatureDefinitionCollection.AddCore(SPFeatureDefinition featdef, SPSite site, String solutionHash, Boolean fForce, Boolean fDoValidation) +26125445
   Microsoft.SharePoint.Administration.SPFeatureDefinitionCollection.AddInternal(String relativePathToFeatureManifest, Guid solutionId, String solutionHash, SPSite site, Boolean force, Boolean fDoValidation, SPFeatureDefinitionContext featureDefinitionContext) +174
   Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureDefinitions(SPFeatureDefinitionCollection featColl, SPFeatureDefinitionContext context, Boolean force, Boolean activateFeatures, SPSite site, SPWeb web) +290
   Microsoft.SharePoint.Administration.SPUserCodeSolutionPackage.EnableSiteCollectionSolution(SPSite site, Int32 solutionGalleryItemId, Boolean force) +23602688
   Microsoft.SharePoint.<>c__DisplayClass1.<AddOrUpgrade>b__0() +4075
   Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) +27609494
   Microsoft.SharePoint.SPUserSolutionCollection.AddOrUpgrade(SPListItem item, SPUserSolution existingSolution) +449
   Microsoft.SharePoint.SPUserSolutionCollection.Add(Int32 solutionGalleryItemId) +574
   Microsoft.SharePoint.WebControls.SolutionItemButton.ActivateItem() +398
   Microsoft.SharePoint.WebControls.SPLinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +72
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

All the solution does it copies a few master pages and related files, nothing is done on activation. The Microsoft SharePoint Foundation Sandboxed Code Service is running. Security patches on development and production boxes are all up to date.

Update:
I removed all .cs files from the project. Though in this case it's ok, I can't do any real development. Dev machine is Windows 7, with SharePoint Foundation and live environment is SharePoint Enterprise. Both have the December 2010 updates / hotfixes installed.

Leaving the question open, since the fundamental problem isn't solved.

share|improve this question
add comment

1 Answer 1

It sounds like the developer may have inadvertently been referencing some of the APIs that are explicitly blocked in the sandbox. He can either tweak the trust level on the development machine or reference the SharePoint DLL specifically for Sandbox solutions.

Here are more details (toward the bottom) : http://blah.winsmarts.com/2009-12-SharePoint_2010_Sandbox_solutions__Architecture_and_Restrictions.aspx

share|improve this answer
    
There are no API's being used (since no code is executed), just features and xml files. Quite an unhelpful error message since the same code works on a development box (although that is standalone rather than a farm, due to budget constraints) –  Sam Mar 17 '11 at 9:43
    
What about FeatureReceivers? That's the code it's failing on. –  James Love Mar 17 '11 at 11:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.