Sandboxing solutions
Sandboxed Solutions is a new concept in Sharepoint 2010 . It helps you to run your custom code in a highly isolated environment. Initially in MOSS 2007 the custom code had to be deployed to central admin which used to be deployed to the site and then was available for the end user to use.
But now with Sharepoint 2010 the user can write custom code and upload it in the solution gallery of the site and its available for use.
Use of Sandbox solution
1. It reduces the time to deploy custom solutions
2. Improves stability of the sharepoint server
3. Any worst written code will not bring down the sharepoint farm (it helps code to be run in partially trusted environment)
4. Custom solution can be uploaded in solution gallery and can be activated as sandboxed solution.
5. SPsite and objects below it are supported in the sandboxed solutions
6. It restricts the intellisense as it runs code in highly isolated environment
(If you copy paste an external code in sandbox solution it will run and compile solution as sandbox but will give error at run time)
eg: SPSecurity. Runwithelivated privelages is not allowed in sandbox solution but if u paste the code in case of webparts it will allow to run the code but will show error when webpart is added to page.The advantage of using sandboxed solution is that even if there is error in the webpart page, entire page will be loaded with error in webpart. As in 2007 if there was error in page the page would not be rendered
Allow execution
SPUCHost service.exe should be started on each farm to allow the use of sandboxed solution
This in turn starts SPUC workerprocess.exe
and SPUCworkerprocessProxy.exe
Define Sandboxing
1. Solution Administration
2. Subset of object model
3. External process
4. Code Access Security policies(CAS)
Sandboxed Solutions is a new concept in Sharepoint 2010 . It helps you to run your custom code in a highly isolated environment. Initially in MOSS 2007 the custom code had to be deployed to central admin which used to be deployed to the site and then was available for the end user to use.
But now with Sharepoint 2010 the user can write custom code and upload it in the solution gallery of the site and its available for use.
Use of Sandbox solution
1. It reduces the time to deploy custom solutions
2. Improves stability of the sharepoint server
3. Any worst written code will not bring down the sharepoint farm (it helps code to be run in partially trusted environment)
4. Custom solution can be uploaded in solution gallery and can be activated as sandboxed solution.
5. SPsite and objects below it are supported in the sandboxed solutions
6. It restricts the intellisense as it runs code in highly isolated environment
(If you copy paste an external code in sandbox solution it will run and compile solution as sandbox but will give error at run time)
eg: SPSecurity. Runwithelivated privelages is not allowed in sandbox solution but if u paste the code in case of webparts it will allow to run the code but will show error when webpart is added to page.The advantage of using sandboxed solution is that even if there is error in the webpart page, entire page will be loaded with error in webpart. As in 2007 if there was error in page the page would not be rendered
Allow execution
SPUCHost service.exe should be started on each farm to allow the use of sandboxed solution
This in turn starts SPUC workerprocess.exe
and SPUCworkerprocessProxy.exe
Define Sandboxing
1. Solution Administration
2. Subset of object model
3. External process
4. Code Access Security policies(CAS)