SlideShare uma empresa Scribd logo
1 de 32
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” (SharePoint 2001)
WHO AM I?
http://www.connecta.se/ | http://www.wictorwilen.se/ |
http://twitter.com/wictor | http://www.sharepointwebpartsinaction.com
• 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
• 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
• Runtime that is:
• Isolated
• Site Collection
• User managed
• /_catalogs/solutions
• Monitored
• Quota, blocking and Solution Validators
WHAT IS A SANDBOX?
• Simple installation
• Avoid long control
processes
• Agile and iterative
development
• Monitoring
• Office 365!
• Limited possibilities
WHY USING A SANDBOX?
• 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
• 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
ADMINISTRATION AND
MONITORING
Demo
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
• 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
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 can be a part of the cloud offering – a new market/Office 365
(AppStore?)
• We will have more fun!
THE SANDBOX FOR DEVELOPERS
• 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
• 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
• 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
• 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 PROJECT
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://blogs.msdn.com/b/vesku/archive/2010/10/14/shar
epoint-2010-and-web-templates.aspx
WEB TEMPLATE
EXPORT SITE
Demo
• 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
SOLUTION VALIDATOR
Demo
Thank You!
http://www.wictorwilen.se
http://twitter.com/wictor
http://www.sharepointwebpartsinaction.com
wictor@wictorwilen.se
Playing in the Sandbox by Wictor Wilén

Mais conteúdo relacionado

Mais procurados

Microsoft Graph with ASP.NET MVC
Microsoft Graph with ASP.NET MVCMicrosoft Graph with ASP.NET MVC
Microsoft Graph with ASP.NET MVC
BIWUG
 
O365Engage17 - Architecting cloud only solutions with office 365, azure, and ...
O365Engage17 - Architecting cloud only solutions with office 365, azure, and ...O365Engage17 - Architecting cloud only solutions with office 365, azure, and ...
O365Engage17 - Architecting cloud only solutions with office 365, azure, and ...
NCCOMMS
 
O365Engage17 - Managing exchange online using power shell, tips &amp; tricks
O365Engage17 - Managing exchange online using power shell, tips &amp; tricksO365Engage17 - Managing exchange online using power shell, tips &amp; tricks
O365Engage17 - Managing exchange online using power shell, tips &amp; tricks
NCCOMMS
 
Office 365, Practical Adoption Strategies
Office 365, Practical Adoption StrategiesOffice 365, Practical Adoption Strategies
Office 365, Practical Adoption Strategies
BIWUG
 

Mais procurados (20)

Microsoft Graph with ASP.NET MVC
Microsoft Graph with ASP.NET MVCMicrosoft Graph with ASP.NET MVC
Microsoft Graph with ASP.NET MVC
 
O365Engage17 - Azure 101 terminology
O365Engage17 - Azure 101 terminologyO365Engage17 - Azure 101 terminology
O365Engage17 - Azure 101 terminology
 
Workflow Best Practices:Five (or More) "Do"s and "Don't"s
Workflow Best Practices:Five (or More) "Do"s and "Don't"sWorkflow Best Practices:Five (or More) "Do"s and "Don't"s
Workflow Best Practices:Five (or More) "Do"s and "Don't"s
 
O365Engage17 - Building portals with microsoft graph api
O365Engage17 - Building portals with microsoft graph apiO365Engage17 - Building portals with microsoft graph api
O365Engage17 - Building portals with microsoft graph api
 
Extending Teams & Groups
Extending Teams & GroupsExtending Teams & Groups
Extending Teams & Groups
 
NextGen Portal for Your Organization
NextGen Portal for Your OrganizationNextGen Portal for Your Organization
NextGen Portal for Your Organization
 
Building Office 365 solutions with React
Building Office 365 solutions with ReactBuilding Office 365 solutions with React
Building Office 365 solutions with React
 
O365Engage17 - Microsoft stream the future of video
O365Engage17 - Microsoft stream   the future of videoO365Engage17 - Microsoft stream   the future of video
O365Engage17 - Microsoft stream the future of video
 
When Windows Apps meet SharePoint
When Windows Apps meet SharePointWhen Windows Apps meet SharePoint
When Windows Apps meet SharePoint
 
SharePoint Saturday Oslo - Introduction to Durable Functions in Azure
SharePoint Saturday Oslo - Introduction to Durable Functions in AzureSharePoint Saturday Oslo - Introduction to Durable Functions in Azure
SharePoint Saturday Oslo - Introduction to Durable Functions in Azure
 
Microsoft Flow in Real World Projects: 2 Years later & What's next
Microsoft Flow in Real World Projects: 2 Years later & What's nextMicrosoft Flow in Real World Projects: 2 Years later & What's next
Microsoft Flow in Real World Projects: 2 Years later & What's next
 
O365Engage17 - Microsoft graph the swiss army knife
O365Engage17 - Microsoft graph   the swiss army knifeO365Engage17 - Microsoft graph   the swiss army knife
O365Engage17 - Microsoft graph the swiss army knife
 
The citizen integrator
The citizen integratorThe citizen integrator
The citizen integrator
 
Windows azure learning poster
Windows azure learning posterWindows azure learning poster
Windows azure learning poster
 
O365Engage17 - Architecting cloud only solutions with office 365, azure, and ...
O365Engage17 - Architecting cloud only solutions with office 365, azure, and ...O365Engage17 - Architecting cloud only solutions with office 365, azure, and ...
O365Engage17 - Architecting cloud only solutions with office 365, azure, and ...
 
SPSBE18: New era of customizing site provisioning
SPSBE18: New era of customizing site provisioningSPSBE18: New era of customizing site provisioning
SPSBE18: New era of customizing site provisioning
 
Advanced PowerShell for Office 365
Advanced PowerShell for Office 365Advanced PowerShell for Office 365
Advanced PowerShell for Office 365
 
O365Engage17 - Managing exchange online using power shell, tips &amp; tricks
O365Engage17 - Managing exchange online using power shell, tips &amp; tricksO365Engage17 - Managing exchange online using power shell, tips &amp; tricks
O365Engage17 - Managing exchange online using power shell, tips &amp; tricks
 
SPC Adriatics 2016 - Introduction to AngularJS with the Microsoft Graph
SPC Adriatics 2016 - Introduction to AngularJS with the Microsoft GraphSPC Adriatics 2016 - Introduction to AngularJS with the Microsoft Graph
SPC Adriatics 2016 - Introduction to AngularJS with the Microsoft Graph
 
Office 365, Practical Adoption Strategies
Office 365, Practical Adoption StrategiesOffice 365, Practical Adoption Strategies
Office 365, Practical Adoption Strategies
 

Destaque

The Ugly Duckling
The Ugly DucklingThe Ugly Duckling
The Ugly Duckling
RuthEA
 

Destaque (20)

How To Hack Your Way to a Bus Seat - Ignite Mumbai
How To Hack Your Way to a Bus Seat - Ignite MumbaiHow To Hack Your Way to a Bus Seat - Ignite Mumbai
How To Hack Your Way to a Bus Seat - Ignite Mumbai
 
Platform prototype for ZL Vórtice
Platform prototype for ZL VórticePlatform prototype for ZL Vórtice
Platform prototype for ZL Vórtice
 
The OpenSplice DDS Revolution -- Episode II
The OpenSplice DDS Revolution -- Episode IIThe OpenSplice DDS Revolution -- Episode II
The OpenSplice DDS Revolution -- Episode II
 
Innovations in Institutional Arrangements: Towards Enabling Continuous Transi...
Innovations in Institutional Arrangements: Towards Enabling Continuous Transi...Innovations in Institutional Arrangements: Towards Enabling Continuous Transi...
Innovations in Institutional Arrangements: Towards Enabling Continuous Transi...
 
Madurodam
MadurodamMadurodam
Madurodam
 
Facebook
FacebookFacebook
Facebook
 
Dialog prestasi SK Tenang Stesen
Dialog prestasi SK Tenang StesenDialog prestasi SK Tenang Stesen
Dialog prestasi SK Tenang Stesen
 
Jornada de puertas abiertas 2016
Jornada de puertas abiertas 2016Jornada de puertas abiertas 2016
Jornada de puertas abiertas 2016
 
The Ugly Duckling
The Ugly DucklingThe Ugly Duckling
The Ugly Duckling
 
ikh311-08
ikh311-08ikh311-08
ikh311-08
 
Sph 107 Ch 15
Sph 107 Ch 15Sph 107 Ch 15
Sph 107 Ch 15
 
Gmecdeck
GmecdeckGmecdeck
Gmecdeck
 
Goodxi
GoodxiGoodxi
Goodxi
 
OpenSplice DDS v5.1
OpenSplice DDS v5.1OpenSplice DDS v5.1
OpenSplice DDS v5.1
 
Sph 106 Ch 10
Sph 106 Ch 10Sph 106 Ch 10
Sph 106 Ch 10
 
1fevrier
1fevrier1fevrier
1fevrier
 
Rupert.Reading.Jan 2015
Rupert.Reading.Jan 2015 Rupert.Reading.Jan 2015
Rupert.Reading.Jan 2015
 
ikh311-03
ikh311-03ikh311-03
ikh311-03
 
PHP & XML: SimpleXML, DOMDocument
PHP & XML: SimpleXML, DOMDocumentPHP & XML: SimpleXML, DOMDocument
PHP & XML: SimpleXML, DOMDocument
 
Foto na Parede - Processo de compra detalhado
Foto na Parede - Processo de compra detalhadoFoto na Parede - Processo de compra detalhado
Foto na Parede - Processo de compra detalhado
 

Semelhante a Playing in the Sandbox by Wictor Wilén

Spca2014 harbar wac
Spca2014 harbar wacSpca2014 harbar wac
Spca2014 harbar wac
NCCOMMS
 
20140211 BTUG.be - Workflow Manager
20140211 BTUG.be - Workflow Manager20140211 BTUG.be - Workflow Manager
20140211 BTUG.be - Workflow Manager
BTUGbe
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePoint
Talbott Crowell
 

Semelhante a Playing in the Sandbox by Wictor Wilén (20)

Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure
Heading to the Cloud : Introduction to deploying a Provider-Hosted App in AzureHeading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure
Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure
 
New SharePoint Features in Visual Studio 2012!
New SharePoint Features in Visual Studio 2012!New SharePoint Features in Visual Studio 2012!
New SharePoint Features in Visual Studio 2012!
 
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
 
Penny coventry auto-bp-spsbe31
Penny coventry auto-bp-spsbe31Penny coventry auto-bp-spsbe31
Penny coventry auto-bp-spsbe31
 
Tom van gaever-sp_serviceapplications_spsbe17
Tom van gaever-sp_serviceapplications_spsbe17Tom van gaever-sp_serviceapplications_spsbe17
Tom van gaever-sp_serviceapplications_spsbe17
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...
 
SPCA2013 - Windows Workflow Manager for the IT Pro
SPCA2013 - Windows Workflow Manager for the IT ProSPCA2013 - Windows Workflow Manager for the IT Pro
SPCA2013 - Windows Workflow Manager for the IT Pro
 
Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?
 
Spca2014 harbar wac
Spca2014 harbar wacSpca2014 harbar wac
Spca2014 harbar wac
 
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flow
 
Getting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentGetting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online development
 
Workflow Manager - a technical overview (Sam Vanhoutte)
Workflow Manager - a technical overview (Sam Vanhoutte)Workflow Manager - a technical overview (Sam Vanhoutte)
Workflow Manager - a technical overview (Sam Vanhoutte)
 
20140211 BTUG.be - Workflow Manager
20140211 BTUG.be - Workflow Manager20140211 BTUG.be - Workflow Manager
20140211 BTUG.be - Workflow Manager
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePoint
 
Envision IT - Application Lifecycle Management for SharePoint in the Enterprise
Envision IT - Application Lifecycle Management for SharePoint in the EnterpriseEnvision IT - Application Lifecycle Management for SharePoint in the Enterprise
Envision IT - Application Lifecycle Management for SharePoint in the Enterprise
 
The Greatest Introduction to SharePoint Framework (SPFx) on earth!
The Greatest Introduction to SharePoint Framework (SPFx) on earth!The Greatest Introduction to SharePoint Framework (SPFx) on earth!
The Greatest Introduction to SharePoint Framework (SPFx) on earth!
 
Introduction to SharePoint Framework
Introduction to SharePoint FrameworkIntroduction to SharePoint Framework
Introduction to SharePoint Framework
 
Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)
 
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Playing in the Sandbox by Wictor Wilén

  • 2. PLAYING IN THE SANDBOX Wictor Wilén SharePoint Server MVP Connecta AB, Sweden http://www.wictorwilen.se
  • 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. • 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. • 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. • Runtime that is: • Isolated • Site Collection • User managed • /_catalogs/solutions • Monitored • Quota, blocking and Solution Validators WHAT IS A SANDBOX?
  • 7. • Simple installation • Avoid long control processes • Agile and iterative development • Monitoring • Office 365! • Limited possibilities WHY USING A SANDBOX?
  • 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. • 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
  • 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. • 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. Playing in the Sandbox WHAT’S IN IT FOR DEVS?
  • 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. • 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. • 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. • 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. • Business Connectivity Services • Silverlight • Client Object Model / JavaScript • User Code Proxies WORKAROUNDS
  • 19. SHAREPOINT PATTERNS & PRACTICES GROUP http://spg.codeplex.com/
  • 20. Playing in the Sandbox BUILDING SANDBOXED SOLUTIONS
  • 21. • Visual Studio 2010 SharePoint Developer Tools • Local SharePoint • Sandbox is the default deployment type A WEB PART PROJECT
  • 22. SANDBOXED WEB PART PROJECT Demo
  • 23. • Create custom workflow activity • Can be used in SharePoint Designer 2010 • Declarative Workflows CUSTOM ACTIVITY
  • 25. USER CODE PROXIES • Farm solution • Allows developers to use code running in full trust
  • 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
  • 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