Thursday, July 25, 2013

What is Sandbox Solution in SharePoint 2010 ?

Sandbox Solution:

When you as a developer write any code, then its risky to deploy that solution on the farm. Because it will affect all the sites/ application hosted on farm if anything goes wrong.

Hence, to make it so restricted, SharePoint 2010 introduced the new concept of Sandbox Solution. In Sandbox solution developer can test his code with limited access to the other resource with farm.

When user or developer write custom code then it is not so trusted and if anything goes wrong with code then its failure causes on entire site. Hence to overcome this issue SharePoint 2010 introduces the concept of Sandbox solution. 

In this case code is only written for particular Site and then its uploaded in the same site. You can find this option under the Site Collection setting. The solution size limit is decided at the time of site creation and if its size increases or code showing bad performance then it is easy to administrator to stop the working of solution which will not affect to other sites within the farm.

If you want to run the particular code under the trusted environment then make a use of the statement like - RunWithElevatedPrivillages.

Related Posts: