Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain.
You must have seen the below error while working with SharePoint 2010 webparts
"Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain"
Here is my take on this
1. Add [assembly:System.Security.AllowPartiallyTrustedCallersAttribute()] in your webparts assembly.cs file.
2. Correct your code - The code which is a sandbox solution has its own restrictions. Remove the method which is out of scope for sandbox or re-deploy the webpart as a farm solution.
If it is a SharePoint class method then in the detail error you can search for "MissingMethodException" which will give you the restricted class and the method name.
Here are some restrictions\limitations listed for sandbox solutions.
Happy Programming!
"Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain"
Here is my take on this
1. Add [assembly:System.Security.AllowPartiallyTrustedCallersAttribute()] in your webparts assembly.cs file.
2. Correct your code - The code which is a sandbox solution has its own restrictions. Remove the method which is out of scope for sandbox or re-deploy the webpart as a farm solution.
If it is a SharePoint class method then in the detail error you can search for "MissingMethodException" which will give you the restricted class and the method name.
Here are some restrictions\limitations listed for sandbox solutions.
Happy Programming!
0 comments:
Post a Comment