Considerations for sandbox Solutions

Source: Internet
Author: User

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:

  • List Definition

  • List instances

  • ONET. xml

  • Webtemplate function Elements (instead of webtemp. XML)

  • Content type/Field

  • Navigation

  • Module/File

  • Function Annotation

  • Web parts-Web parts

  • Derived fromSystem. Web. UI. webcontrols. webparts. webpartSupport for all Web Components

  • Event Receiver

  • Spitemeventreceiver

  • Splisteventreceiver

  • Spwebeventreceiver

  • Custom operations

  • Declarative Workflow

Sandbox solutions do not support the following features and elements:

    • Visual Web Components

    • Application page

    • Custom operation group

    • HidecustomactionElement

    • Content Type Binding

    • Functions within the scope of Web Applications

    • Functions in the Field Scope

    • Workflow containing code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.