Install-SPUserSolution : Sandboxed code execution request failed.

Install-SPUserSolution : Sandboxed code execution request failed.

This is a really tricky error I had when trying to deploy a Sand-boxed Solution using PowerShell on a new farm.  The error “Install-SPUserSolution : Sandboxed code execution request failed.”  happened with PowerShell, and with the GUI.

I looked in the ULS log and found this:
Sandboxed code execution request failed. – Inner Exception: System.InvalidOperationException    Server stack trace:      at Microsoft.SharePoint.Utilities.Verify.DoFailTag(UInt32 tag, ULSCat category, Type type, String format, Object[] args)     at Microsoft.SharePoint.Utilities.Verify.IsTrueTag(UInt32 tag, ULSCat category, Boolean expression, Type type, String format, Object[] args)     at Microsoft.SharePoint.UserCode.SPUserCodeExecutionHost.Execute(Type userCodeWrapperType, Guid siteCollectionId, SPUserToken userToken, String affinity, SPUserCodeExecutionContext executionContext)     at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)     at System.Runti… 28b119be-321a-42d6-892a-b7ddcf358e74

With no results on Google on how to fix this issues I tried a lot of things without ever being able to replicate it on another machine.
What I found is that there was another related error  :  (You can also check fix for this specific error here)
Unable to load assembly group. The user assembly group provider threw an exception while trying to provide user assemblies for the specified assembly group.

The Fix:

I added the Service Account running the Sandbox Service with Full Control rights on the Web Application (User Policy) and it worked. 

I deleted the Web Application and re-ran the script (without re-adding the Full Control rights) and it worked no problem.  

Say thanks if this helped 🙂
No ratings yet.

Please rate this

 
Comments

Hum

Still does not work ! :'(

What part dosen’t work for you? did you add the account running the Sandbox Service with full control on the Web Application?

This has happened on one of my WFE in production and I don’t have the option to alter the sandbox service account since the duties are compartmentalized & again it’s in production. I’m received the same error but it’s on one of my customer’s sites. Do you happen to have another alternative fix to this problem?

Hello, No I don’t have another fix at the moment :(. But if you find something, let me know!

Leave a Reply