In this blog post, documenting the quick notes that I made during my learnings on SharePoint SandBox solutions Vs Farm Solutions.
Farm Solution
- Farm admin needs to deploy
- Deploy WSP
- Add WSP to Solution Store using AddSolution
- Deploy Solution using solution store management page in Central Admin or through Powershell
Sandbox Solution
- Site Collection Owner can deploy
- Runs inside a secured monitored process
- Have Limited Resource Access
- When deployed will not show up in
- GAC or in FileSystem
- Deploy Sandbox solution to Site Collection
- Site Settings --> Galleries - Solutions --> Upload
- 14 hive --> UserCode
- SPUCWorkerProcess.exe is where the Sandbox solution runs not inside the W3WP.exe
- Web.config --> Trust Level defined as wss_sandbox
- Central Admin
- System Settings
- Services --> Start --> MS SharePoint Foundation Sandboxed Code service
- Configure Quotas and Locks
- CA --> Application Management
- Load Balancing
- CA --> System Settings --> Manager User Solutions
- Not allowed (Restrictions)
- Objects over SPSite
- SPSecurity (No Impersonation)
- No FileSystem access
- WebPart Communications not allowed (As WP comm uses Reflections internally)
- Solution Validator
- SPSolutionValidator
- Using Microsoft.SharePoint.Administration;
- Using Microsoft.SharePoint.UserCode;
- Sandbox Solutions Full Trust Proxies
- Instead use WCF service