- Solutions that you deploy into a sandbox, which are known as sandbox solutions.cannot use certaion computer and network resources and cannot access content out side the site collection they are deployed in.
- Solutions can be added to a production server SP server 2010 environment with out the risk of affecting process outside the sandbox.
- Site collection adiministrators can deploy sandbox solutions,freeing farm administrators from this task.
- Scalability and flexibility are increased because sandboxes run in seperate process that can be restricted by quotas,and their effect on the farm cannot be monitored.
Script to Report all Sandbox Solutions :
- Get -SPUserSolution -site http:// sbx:03:222/sites/TeamTest
Issues or Concerns about Sandbox Solutions:
- SPSecurity class is not part of the sandboxed SharePoint API i.e
SPSecurity.RunWithElevatedPrivileges(
delegate
{
Label ListCount = new Label();
ListCount.Text =
String.Format("There are {0} Lists",
SPContext.Current.Web.Lists.Count);
Controls.Add(ListCount);
});
The above code is not supported in sandbox solution. It will throw the following exception.
Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred. Visual WebParts are not supported in sandbox solution.
- The SPWebApplication class is not available. Among other things, this means that a sandboxed solution cannot access anything outside its hosting site collection.
- Mapped folders cannot be added to the project.
No comments:
Post a Comment