Monday, September 3, 2012

Sandboxed Solution Vs Farm Solution

Sandboxed Solution Vs Farm Solution

Whenever you create a solution for a SharePoint you must have to specify the trust level for the solution. There  are two trust levels defined in the SP2010 i.e.
  1. Sandboxed Solution (or User Solution)
  2. Farm Solution
Figure: Trust Level options
Sandboxed Solutions:
  • Are more restrictive solutions i.e. provide limited functionality
  • A solution that runs in  secure sandbox i.e. in a separate process then wpw3.exe.
  • Are secure by default and are protected by CAS policies i.e. deploying sandboxed solution does not affect other solutions
  • Easy monitoring
  • Are deployed to Site Collection level
  • One limitation is that, they can’t access the File system
  • SPUCHostService.exe, also known as the Sandboxed Code Service, runs on each server on the farm that you are going to allow to work in the sandbox
  • SPUCWorkerprocess.exe process is the sandbox worker process, redeploying Sandboxed solution does not required to restart application pool
  • Can be validated using the sandboxed solution validation by the farm administrator
Farm Solutions:
  • Have no restrictions i.e. provide unrestricted functionality
  • A solution that runs in a wpw3.exe (process)
  • Are less secure in nature, can be protected by implementing custom CAS ploicies
  • Difficult monitoring
  • Can be deployed to any object hierarchy
  • No limitations in accessing File system
  • When deployed, they could run any kind of code and they could make any kinds of changes to the servers.

No comments: