An unknown exception occurred while executing a sandboxed code...
I've been experimenting with different approaches to creating different types of solutions within Visual Studio 2012 and have stumbled across an issue when trying to activate or consume features in a SharePoint 2013 Sandboxed Solution. I end up with the error:
An unknown exception occurred while executing a sandboxed code solution request in the worker process.\r\n|0
I appreciate these are now allegedly "deprecated" in favour of the new "Apps for SharePoint" model but I can see that the use of server side code may still be a preference of many.
Steps to reproduce the error:
- Start Visual Studio 2012
- New Project...
- Within Office/SharePoint underneath Visual C#, select "SharePoint Solutions" and choose "SharePoint 2013 Project".
- Keep the Default Name and Choose "OK".
- Choose "Deploy as a Sandboxed Solution" and choose Finish.
- Right-Click the Project Node and Choose Add .... new item ... and select "Visual Web Part".... choose "ok"
- Within the "VisualWebPart1.ascx" file in the designer - simply add "Hello World" within an HTML "P" tags beneath the last Control declaration.
- Hit F5 and agree to attach the debugger or right-click and Deploy.
- In SharePoint, Edit your page, choose Insert .... WebPart ... and within the "Custom" folder, pick your VisualWebPart1.
Boom!!! - Error as appears above.
Interestingly, the same process works perfectly fine for "Farm Solutions" so one might assume there's a permissions issue with SPUCWorkerProcess that Sandboxed solutions run under.
Interestingly ... a little hunt around the web seems to point to the fact that running SharePoint 2013 on the SAME physical machine as the DC running Windows Server 2012 is Unsupported.
Windows 2008 R2 seems to be unaffected ... however the CloudShare Image for SharePoint 2013 RTM is Windows 2012.
Further details in this TechNet article if it helps anybody.
Please sign in to leave a comment.