Platinum Sponsor
Gold Sponsors
PLAYING IN THE SANDBOX
Wictor Wilén
SharePoint Server MVP
Connecta AB, Sweden
http://www.wictorwilen.se
• Wictor Wilén
• SharePoint Server MVP, Author, Solutions Architect
• Connecta AB, Sweden
• Been in the game since ”Tahoe”...
• Everyone should know when, where and how to use the
SharePoint 2010 Sandbox!
• I will provide you with a bunch of tips a...
• What is a Sandbox?
• Why use a Sandbox?
• The Sandbox in SharePoint 2010
• Sandbox administration
• Development of Sandb...
• Runtime that is:
• Isolated
• Site Collection
• User managed
• /_catalogs/solutions
• Monitored
• Quota, blocking and So...
• Simple installation
• Avoid long control
processes
• Agile and iterative
development
• Monitoring
• Office 365!
• Limite...
• Exists in the Site Collection
• Managed by the Site Collection Administrators
• Can be blocked by Farm Administrators (C...
• Consumes Resource points
• 15 different Resource Measures
• Quota (standard 300 points)
• Calculated every 15:th minute ...
ADMINISTRATION AND
MONITORING
Demo
SharePoint App Server/WFE
User Code Service
SPUCHostService.exe
Sandbox Worker Process
SPUCWorkerProcess.exe
Sandbox Proxy...
• The Sandbox Worker Process uses a separate DLL
• Microsoft.SharePoint.dll
• C:Program FilesCommon FilesMicrosoft SharedW...
Playing in the Sandbox
WHAT’S IN IT FOR DEVS?
• Yup:
• We’re limited!
• But:
• We can get our applications and functions out faster
• We cannot crash the server
• We ca...
• List defintions
• List instances
• Web Templates
• Content Types and Fields
• Modules and Files
• Features (Scope: Web &...
• Hide Custom Action elements
• Content Type bindings
• Features (Scope: WebApplication & Farm)
• Programmatic Workflows
•...
• Anything outside of the Site Collection
• Database calls
• Web Services
• File System access
• Send e-mail
• Security an...
• Business Connectivity Services
• Silverlight
• Client Object Model / JavaScript
• User Code Proxies
WORKAROUNDS
SHAREPOINT PATTERNS & PRACTICES GROUP
http://spg.codeplex.com/
Playing in the Sandbox
BUILDING SANDBOXED SOLUTIONS
• Visual Studio 2010 SharePoint Developer Tools
• Local SharePoint
• Sandbox is the default deployment type
A WEB PART PRO...
SANDBOXED WEB PART PROJECT
Demo
• Create custom workflow activity
• Can be used in SharePoint Designer 2010
• Declarative Workflows
CUSTOM ACTIVITY
SANDBOXED CUSTOM ACTIVITY
Demo
USER CODE PROXIES
• Farm solution
• Allows developers to use code running in full trust
USER CODE PROXY
Demo
• WebTemplate, partly replaces Site Template (STP)
• Light version of Site Definition
• WSP packages (export)
• http://blo...
EXPORT SITE
Demo
• Farm solution
• Validation of all Sandboxed solutions
• Multiple allowed
• OOB approves all solutions
• Validation is pe...
SOLUTION VALIDATOR
Demo
Thank You!
http://www.wictorwilen.se
http://twitter.com/wictor
http://www.sharepointwebpartsinaction.com
wictor@wictorwile...
Playing in the Sandbox by Wictor Wilén
Upcoming SlideShare
Loading in...5
×

Playing in the Sandbox by Wictor Wilén

2,719

Published on

Presentation from Southeast Asia SharePoint Conference

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,719
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Playing in the Sandbox by Wictor Wilén

  1. 1. Platinum Sponsor Gold Sponsors
  2. 2. PLAYING IN THE SANDBOX Wictor Wilén SharePoint Server MVP Connecta AB, Sweden http://www.wictorwilen.se
  3. 3. • Wictor Wilén • SharePoint Server MVP, Author, Solutions Architect • Connecta AB, Sweden • Been in the game since ”Tahoe” (SharePoint 2001) WHO AM I? http://www.connecta.se/ | http://www.wictorwilen.se/ | http://twitter.com/wictor | http://www.sharepointwebpartsinaction.com
  4. 4. • Everyone should know when, where and how to use the SharePoint 2010 Sandbox! • I will provide you with a bunch of tips and best practices during this session THIS SESSION
  5. 5. • What is a Sandbox? • Why use a Sandbox? • The Sandbox in SharePoint 2010 • Sandbox administration • Development of Sandboxed solutions • Limitations and Possibilities of the Sandbox • And a bunch of demoes... AGENDA
  6. 6. • Runtime that is: • Isolated • Site Collection • User managed • /_catalogs/solutions • Monitored • Quota, blocking and Solution Validators WHAT IS A SANDBOX?
  7. 7. • Simple installation • Avoid long control processes • Agile and iterative development • Monitoring • Office 365! • Limited possibilities WHY USING A SANDBOX?
  8. 8. • Exists in the Site Collection • Managed by the Site Collection Administrators • Can be blocked by Farm Administrators (Central Administration) • Load balancing • Execution on servers with Sandboxed Code Service running (Affinity routing) • Execution on servers which receive the request • Solution Validators • Only approved solutions can be activated and executed SANDBOX ADMINISTRATION UserAdministrator
  9. 9. • Consumes Resource points • 15 different Resource Measures • Quota (standard 300 points) • Calculated every 15:th minute (timer job) • Shuts down for 24h if Quota is reached SANDBOX MONITORING
  10. 10. ADMINISTRATION AND MONITORING Demo
  11. 11. SharePoint App Server/WFE User Code Service SPUCHostService.exe Sandbox Worker Process SPUCWorkerProcess.exe Sandbox Proxy Process SPUCWorkerProcessProxy.exe Full SharePoint Object Model Subset of SharePoint Object Model Untrusted code SANDBOX ARCHITECTURE HTTP Request SharePoint WFE SharePoint App Pool W3WP.exe Execution Manager CASPolicies
  12. 12. • The Sandbox Worker Process uses a separate DLL • Microsoft.SharePoint.dll • C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14UserCodeassemblies • Subset of the orginal Microsoft.SharePoint.dll • Differs from original by version number • 14.900.762.1000 vs 14.0.5114.5000 • <bindingRedirect oldVersion="0.0.0.0-14.900.0.0" newVersion="14.900.0.0" /> SANDBOX INTERNALS
  13. 13. Playing in the Sandbox WHAT’S IN IT FOR DEVS?
  14. 14. • Yup: • We’re limited! • But: • We can get our applications and functions out faster • We cannot crash the server • We can be a part of the cloud offering – a new market/Office 365 (AppStore?) • We will have more fun! THE SANDBOX FOR DEVELOPERS
  15. 15. • List defintions • List instances • Web Templates • Content Types and Fields • Modules and Files • Features (Scope: Web & Site) • Web Parts • Event Recievers (Item, List, Web) • Custom Actions • Declarative Workflows* and Custom Activities WHAT CAN BE DONE
  16. 16. • Hide Custom Action elements • Content Type bindings • Features (Scope: WebApplication & Farm) • Programmatic Workflows • Timer jobs • Changes to files in the SharePoint Root • (Visual Web Parts) WHAT CAN NOT BE DONE 1/2
  17. 17. • Anything outside of the Site Collection • Database calls • Web Services • File System access • Send e-mail • Security and permissions • Impersonation • System.Web • ClientScriptManager • Upload files (HttpRequest.Files) WHAT CAN NOT BE DONE 2/2
  18. 18. • Business Connectivity Services • Silverlight • Client Object Model / JavaScript • User Code Proxies WORKAROUNDS
  19. 19. SHAREPOINT PATTERNS & PRACTICES GROUP http://spg.codeplex.com/
  20. 20. Playing in the Sandbox BUILDING SANDBOXED SOLUTIONS
  21. 21. • Visual Studio 2010 SharePoint Developer Tools • Local SharePoint • Sandbox is the default deployment type A WEB PART PROJECT
  22. 22. SANDBOXED WEB PART PROJECT Demo
  23. 23. • Create custom workflow activity • Can be used in SharePoint Designer 2010 • Declarative Workflows CUSTOM ACTIVITY
  24. 24. SANDBOXED CUSTOM ACTIVITY Demo
  25. 25. USER CODE PROXIES • Farm solution • Allows developers to use code running in full trust
  26. 26. USER CODE PROXY Demo
  27. 27. • WebTemplate, partly replaces Site Template (STP) • Light version of Site Definition • WSP packages (export) • http://blogs.msdn.com/b/vesku/archive/2010/10/14/shar epoint-2010-and-web-templates.aspx WEB TEMPLATE
  28. 28. EXPORT SITE Demo
  29. 29. • Farm solution • Validation of all Sandboxed solutions • Multiple allowed • OOB approves all solutions • Validation is performed during activation • When validators are updated all solutions are validated at first request SOLUTION VALIDATION
  30. 30. SOLUTION VALIDATOR Demo
  31. 31. Thank You! http://www.wictorwilen.se http://twitter.com/wictor http://www.sharepointwebpartsinaction.com wictor@wictorwilen.se

×