Search This Blog

Monday, September 8, 2014

SharePoint Sandbox Solution

Though the sandbox solution is an awesome value add from Microsoft (as part of SharePoint 2010) and great addition to our rich enterprise platform - SharePoint, there are certain limitations/boundaries to it about its use and as a developer/consultant/Analyst/Administrator, we must know this when suggesting/developing this.

So, here is the compiled list:
Limitation/feature not supported
Its meaning/interpretation
Use of SPSecurity class
SPSecurity Class is mainly used for 'Running with elevated privileges', so operation/code that need to run under Application pool account cannot be done.
Visual web part
Visual webpart is not supported, though there is workaround using SharePoint Power tools. More info here
Workflows which involve coding
In Sandbox, no code based Workflows are allowed.  But workflows which can be imported in Visual studio (without classes) can be used.
Minimal use of SharePoint object model
There is very limitation in using SharePointserver object model. E.g.
  • Few classes under Microsoft.SharePoint.Administration are available
  • Accessing SharePoint property bag
  • You cannot access managed metadata objects (taxonomy)
  • SPSite object can be used with SPContext (like SPContext.Current.Site) but not to other site collections
  • SharePoint.WebControls not available completely
  • Cant access user profiles, search
  • No BCS support
Site collection deployment
Sandbox solution can be deployed at Site collection level. There is no scope at web application or Farm. You will need to deploy solution across multiple site collection.
No custom timer jobs
Custom timer jobs are not supported.
No access to SharePoint server/file system
 You cannot:
  • Map Layouts folder
  • Make changes to registry file
  • Cannot read file system as Class System.IO is not supported
  • No custom HTTP Modules
  • Create Site definition
  • No GAC deployment (As solution/files go in content database)
  • Create custom application/site page with code behind
No feature stapling
There is no support for feature stapling (Activating one feature on activation of other)
Changing the web.config
You cannot use SPWebConfigModification
SharePoint web controls
There are few SharePoint web controls like SPTreeView which is not supported
Accessing Event viewer/other network resources
You cannot access event viewer logs

Apart from the above list, here are the few other things:
  • You cannot Export Sandbox web part as we do with farm based web part
  • There is no caching support
  • No developer dashboard


Though the focus of this article is written on sandbox solution limitation, its value cannot be underestimated. It's a powerful enhancement to SharePoint enabling developers to talk to SharePointserver in a new way and a relief to administrators.

No comments:

Post a Comment