Friday, May 18, 2012

Limitations of Sandboxed Solutions in SharePoint 2010

In this article we will discuss what are the limitations of Sandboxed solutions. You can check my last article on What you can do with Sandboxed Solutions?

- Since Sandboxed solutions are site collection specific, so you can not access data from other site collections. You can only access resources within the same site collection.

- You can not use SPSecurity.RunWithElevatedPrivileges method in case of Sandboxed solution.

- Executing code within Sandboxed solution causes a little performance overhead. Also Sandbox worker processes are terminated if they run for more than 30 seconds.

- Logging functionality is unavailable within the sandbox environment. Sandboxed solutions cannot write entries to the Windows Event log or the Unified Logging Service (ULS) trace log.

- You cannot read configuration settings from or write configuration settings to the Web.config file.

- You can store and retrieve settings in the SPWeb.AllProperties hash table, but you cannot use property bags at any level of the SharePoint hierarchy.

- You cannot read or write settings to the hierarchical object store, because you do not have access to an SPWebApplication object or an SPFarm object.

- You can read or write settings to a SharePoint list within the same site collection not to other site collection.

- In case of deployment you can not deploy any files to the server file system in Sandboxed solutions.

You can also check my article on Create event receiver in Sandboxed solution is SharePoint.