Sandbox solution is a feature included in Microsoft SharePoint 2010 that enables website set users to upload their own customCodeSolution. A common sandbox solution is to upload your Web parts.
Sandbox SharePoint ApplicationProgramRunning in a secure and monitored process can only access a limited part of the web site. Microsoft SharePoint 2010 enables sandbox solutions using feature combinations, solution libraries, solution monitoring, and verification frameworks.
Project trust level
Visual StudioSandboxed SolutionTo support the sandbox solution. You can set this attribute at any time in the project, or"SharePoint custom wizard"Specify this attribute when creating a project.
IfSandboxed SolutionSet propertyFalse, Or select"Deployment as a field solution"The solution is regarded as a solution with a field scope. HoweverSandboxed SolutionSet propertyTrue, Or select"Deployment as sandbox solution"The solution is not considered as a field solution.
SharePoint website hierarchy
To understand how the sandbox solution works, it is useful to understand that the scope of a Sharepoint website is hierarchical. The top element is called the Web field, and other elements belong to the top element:
Web Field
Web application
Website set A1
Website A1A
Web application B
Website set B1
Website B1a
Website B1b
Website set B2
Website B2a
As you can see, a web site can contain one or more web applications. A Web application can contain one or more website sets, and a website set can contain sub-websites, and so on. Changes made to a website set will only affect this website set, but will not affect other website sets. However, changes made at the web field level will affect all website sets in the field.
Windows SharePoint Services (WSS) 3.0 only allows you to deploy the solution at the site level, while Microsoft SharePoint Foundation 2010 allows you to deploy the solution at the site level (field solution) or the website set level (sandbox solution ).
Why is sandbox solution used?
In WSS 3.0, you can only deploy the solution at the site level. This means that potentially harmful or unstable solutions may be deployed, affecting the entire web site and all other website sets and applications running on the site. However, by using the sandbox solution, you can deploy the solution in the sub-region of the site (a specific website set ). To provide additional protection, the solution assembly is not loaded into the main IIS process (w3wp.exe, Instead, it is loaded into a separate process (spucworkerprocess.exe. This process will be monitored, and quotas and adjustments will be implemented to prevent malicious activities in the field (such as running a compact cycle that consumes CPU cycles) in the sandbox solution.
Website set solution Library
Windows SharePoint Services 2010 contains a feature named "website set solution library". You can click"Website operations","Website Settings","Database"And"Solution"To access this function. A solution library is a solution repository that administrators can use to manage Centralized solutions for their websites.
The solution library is a document library stored in the root web directory of the SharePoint website. The solution library replaces the website template and supports solution packages. When you upload a Sharepoint solution package (. WSP) file, the file is processed as a sandbox solution.
Sandbox solution restrictions
When deploying a sandbox solution, the SharePoint feature set that can be used for the sandbox solution is limited, which helps reduce any possible security vulnerabilities. Some of the restrictions include:
The Sandbox solution can only use a limited number of deployable solution elements. SharePoint project templates (such as website definitions and workflows) that may be vulnerable to attacks will be unavailable.
SharePoint runs the sandbox solution code in the process (spucworkerprocess.exe) that is independent from the main IIS application pool (w3wp.exe) process.
You cannot add a ing folder to a project.
The type in Microsoft SharePoint Server 2010 Assembly Microsoft. Office. server cannot be used in the sandbox solution. The type in Microsoft SharePoint Foundation 2010 Assembly Microsoft. SharePoint can only be used in the sandbox solution.
Note that the configuration of the SharePoint solution as a sandbox solution has no impact on the Sharepoint Server; this will only determine how the SharePoint project is deployed from Visual Studio to SharePoint and the Assembly to which the project will be bound. This will not affect the generated. WSP file, and the. WSP file does not containSandboxed SolutionData associated with the attribute.
Functions and elements in the sandbox Solution
Sandbox solutions support the following features and elements:
Sandbox solutions do not support the following features and elements: