Wednesday, May 25, 2011

Unable to load assembly group - Sandbox solution

I ran into an error lately when i tried to add a web part which i created as a Sandbox Solution. It said

Unable to load assembly group. The user assembly group provider threw an exception while trying to provide user assemblies for the specified assembly group

To resolve it follow the below steps
1. Go to services.msc
2. Check the service account for "SharePoint 2010 User Code Host service"
3. Change it to a domain account or probably to the farm account.

3 comments:

  1. This is not right. Do not use Services UI for this. You must use the Central Administration for changing service accounts otherwise they get out of synch with Share Point. Bad things will follow.

    ReplyDelete
  2. Also, using the farm account, which has a lot of privileges, partially defeats the purpose of using a sandbox. In a dev environment it's not that big a deal. In a production environment you should grant the sandbox service account full control on the web application, which solves the same problem.

    ReplyDelete