Before SharePoint 2010, the farm administrator had to trust custom code running on the server which developer had written. That meant having to perform lengthy tests and code reviews before custom code was allowed to run on the server, which cost a lot of time and money. Also there is a risk that if somehow unintentionally the wrong code went onto the server, then there will be chances of performance down issue, server down, crash etc. which is a big risk.
Â Â Â Â So by considering all these issues, In SharePoint 2010 there is a concept of sandboxing user code, which allows for isolation and resource limitations regarding memory, CPU, database query count, and time. This means that users can add and consume custom solutions safely without impacting overall farm performance and stability. Sandboxed solutions run with lower trust for hosted environments, for testing foreign solutions, and for secured production servers. A sandboxed solution cannot access the full SharePoint object model; it is limited to a subset of the Microsoft.SharePoint namespace. Sandboxed solutions run in a safe and monitored process with restricted access to resources.
Need more elaboration on Sandbox solution like what are the items deployed under sandbox solutions, restricted areas?
Using a sandboxed solution you can deploy the following SharePoint items:
â€¢ Web Parts (code only; not visual Web Parts)
â€¢ Event receivers
â€¢ Content types
â€¢ List templates
â€¢ List instances
â€¢ Custom actions
â€¢ InfoPath forms
Deploying files to disk is not possible in Sandbox solution. This means you canâ€™t deploy the
following SharePoint items:
â€¢ Visual Web Parts (they contain web controls that have to be deployed to disk)
â€¢ Business data connectivity models
â€¢ Application pages
â€¢ User controls
â€¢ Files included in mapped folders, such as IMAGES or LAYOUTS
The Microsoft SharePoint Foundation Sandboxed code execution host service (SPUserCodeV4) executes the user code (code in your sandboxed solution) in the sandbox.
This service consists of the following three processes:
â€¢ Microsoft SharePoint Foundation Sandboxed code execution host service (SPUCHostService.exe)
â€¢ Microsoft SharePoint Foundation Sandboxed Code Execution Worker Process (SPUCWorkerProcess.exe)
â€¢ Microsoft SharePoint Foundation Sandboxed Code Execution Worker Process Proxy (SPUCWorkerProcessProxy.exe)