Understanding Sandboxed Solutions

A sandboxed solution is packaged as a web solutions package (.wsp) and deployed to the Solution Gallery of a site collection. Since a sandboxed solution is not allowed to access anything outside the site collection, features deployed as a part of sandboxed solutions cannot be scoped beyond the level of a site collection. Further, only a restricted subset of the SharePoint object model is available to sandboxed solutions.

The most important thing to note when developing sandboxed solutions is that you cannot deploy anything to the file system of servers. This implies that you cannot deploy components such as application pages, user controls, and so on, requiring access to the file system using sandboxed solutions.

In spite of the above restrictions and limitations associated with sandboxed solutions when compared to farm solutions, many factors may favor the former over the latter in certain scenarios:

• Sandboxed solutions enable the site collection administrator to install custom solutions, which implies that for custom code deployment farm level administration privileges are not required.

• Since sandboxed solutions run in a separate process, you can deploy them without worrying about impacting any processes outside the sandbox.

• Farm administrators can monitor the health and resource consumption of the sandboxed solutions.

• Any solutions causing problems can be blocked by the farm administrator.


Did You Know?

Since there were no sandboxed solutions in SharePoint 2007, all the code developers wrote ran under full trust. Any bad piece of code could easily bring down the entire farm and often created immense headaches for farm administrators. Thanks to sandboxed solutions in SharePoint 2010, farm administrators can now easily monitor custom solutions for resource usage and block any rogue solution from execution.


Since the sandboxed solutions protect the farm from problematic code, they are useful when you want to deploy custom code that has not been rigorously tested for reliability. Also since sandboxed solutions cannot access anything outside the site collection and can be deployed with site collection level administration privileges, they are useful in hosting environments where you may not have farm level privileges and you are guaranteed that anybody else’s custom code won’t affect your site collection.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset