Limitation of Sandbox Solution
Below is list of limitation of sandbox solution in SharePoint 2010. Typical interview question 🙂
- Deployment at site collection level (No Web Application-scoped Features or Farm-scoped Features). So, If you have 100 site collections, then you have to deploy the same sandbox solution to 100 site collections.
- No SPSecurity – Therefore no Elevated Privileges
- You can’t use SPSite object to get other site collections. (But you can use it to get current site as : SPSite site = SPContext.Current.Site)
- Visual webparts are not supported (But you can use the “Visual Studio 200 SharePoint Power Tools” to get this functionality)
- Cannot call to the network resources. E.g. You cannot read/write to a database on the server (But you can use Silverlight)
- Only “No code” workflows allowed. No Visual studio workflows (But the workflows without classes which are imported and edited in Visual studio will work!)
- No support for System.IO, Therefore you Cannot read/write to the file system.
- HideCustomAction, CustomActionGroup are not allowed. But you can use <CustomAction>
- Remember, Resource Usage Quotas/Limits applied on Sandboxed solutions http://msdn.microsoft.com/en-us/library/gg615462.aspx
- No Feature stapling supported.
- Can’t write to registry (But you can read)
- Limited Server Object Model MSDN: http://msdn.microsoft.com/en-us/library/gg615454.aspx
- Can’t set cookies in the sandbox. Use JQuery plugin instead http://plugins.jquery.com/project/cookie
- No call to external WCF/web services such as HTTP calls (But we can use AJAX)
- Content Type Binding is not supported
- No support for custom Timer jobs
- Can’t use SharePoint mapped folders such as _layouts
- Can’t export a Sandboxed Web Part
- Microsoft.SharePoint.WebControls and Microsoft.SharePoint.WebPartPages Namespace are not available.
- Managed Metadata – No programmatic access to taxonomy object model.
- No ADO.NET support!
- No support for SPUtility.SendEmail, So you can’t Send Mails using this class.
- No caching support
- No Custom HTTP Modules
- No developer dashboard
- No Site Definition
- Can’t use controls for delegation
- No Business Connectivity Services support
- No Localization support
- No SPWebConfigModification usage
- Most of the Microsoft.SharePoint.Administration are disabled
- No Document converters
- No User Control support.
- NO Custom service applications
- SharePoint web controls (such as SPTreeView) are not supported
- ClientScriptManager is not available – No access to ScriptManager.
- Can’t access the event viewer for logging
- No PropertyBags of SharePoint Object model are not accessible,( But you can use SPWeb.AllProperties or custom list to store settings)
- No GAC Deployment – Your solutions will be stored in content database. Can’t deploy assemblies to GAC and Cannot call assemblies deployed out of Global Assembly Cache
- CustomPropertyToolPart not supported
- Can’t create application pages or site pages with code behind
- No Server side redirects, such as Response.Redirect, Server.Transfer, SPUtility.Redirect.
- Can’t access some of the enterprise services like UserProfile, Search
- Can’t access dlls from BIN and resources files(.resx)
- Can’t access code that is not marked to allow partially trusted callers
- Can’t access Cache object.
- HttpRequest.Files collection will not contain anything
- Only SPLimitedWebPartManager is available.
- SharePoint Web controls (namespace SharePoint.WebControls) are not available,
- Last but not least: site Template Binding is not supported.
Hope this helps…Happy coding..!!!
(Visited 32 times, 1 visits today)