SlideShare a Scribd company logo
1 of 29
SP 2010 Sandboxed Solutions  MostafaElzoghbi Sr. Software Engineer  - C# MVP MetroStar Systems
Agenda Sandbox Solutions Overview SharePoint 2007 Challenges for Farm Solutions SharePoint 2010 Approach for Sandbox Solutions Sandbox Solutions Lifecycle Executing Code in the Sandbox Sandbox Solutions Limitations Sandbox Resource Monitoring Load balancing Sandbox solutions Solution Validation
Overview of the Sandbox Allows a subset of the full capabilities in the SharePoint API Secure – enforcing the sandbox Execute in a partially trusted environment Code executes in a special service process Subject to CAS Validation framework Provides way to do custom farm wide validation for the deployed packages Each solution is isolated to its site collection
Defining the Sandbox Solution Administration - Quota/Blocked Solutions Subset Object Model External Process Code Access Security (CAS Policies)
SharePoint 2007 Challenge Developers build custom solutions Administrators can only secure solutions with CAS Hard to control what is being done in custom code Biggest cause of SharePoint support cases: custom code
SharePoint 2010 Approach Developers build custom solutions Site collection owners deploy, activate and implement the customizations Administrators leverage resource monitors to check site collection usage Automatic triggers “turn off” custom solutions in a site collection that are too expensive and taxing on the server
Sandboxed Solutions Help Enterprises Sandboxed solutions are important because Hosted environments much easier to manage Reduces time to deploying custom solutions Removing process of getting code approved and deployed by IT (Dev-Staging-Production) Improves stability of SharePoint servers Now badly performing code isolated to site collection rather than potentially bringing down an entire server
Create/Deploy Sandbox solution demo
Site Collection Administration Solution Gallery -- _catalogs/solutions Empower Site Collection administrators
Sandboxed Solution Lifecycle
Managing Sandbox Solutions demo
Solution Administration Central Administration Block Solutions Quota Templates
The Subset Object Model SPSite In general SPSite and below No SPSecurity No SPSite construction Common namespaces not available Microsoft.SharePoint.Administration Microsoft.SharePoint.WebControls SPWeb SPList SPListItem
A Separate Process User Code Service : Started where WFE configured to run sandbox solutions.(SPUCHostService.exe) Sandbox Worker Process: where your actual code runs(SPUCWorkerProcess.exe) Sandbox Worker Process Proxy(SPUCWorkerProcessProxy.exe)
Sandbox and Code Access Security AspNetHostingPermission, Level=Minimal SharePointPermission, ObjectModel=true SecurityPermission, Flags=Execution Sandbox My.dll wss_usercode.config Other.dll System DLL SharePoint DLL Full Trust SharePoint OM Subset OM
Front end Back end Host Service ExecutionManager Sandboxing Architecture Worker Process Untrusted Code Subset Object Model Full Object Model
Sandboxed Solutions Process 2 1 5 6 7 4 3 Per-WFE AssemblyCache RootSPWeb of SPSite <siteguid>ompany.intranet.webpart.wspoo.dll Solution gallery Web Part gallery Sandboxed Worker Process WebParts.wsp
Types of Sandboxed Solutions Sandboxed Solutions Support Sandboxed solutions offer developers a subset of the SharePoint API available fully trusted solutions Site collection and site scoped Features Many XML constructs available: Modules, Lists, ContentTypes, etc. Client technologies to access external data – JavaScript, Silverlight etc. Offloading resource usage and access handling to client
Best Practices: Sandbox Boundaries  Off-box connections, http, web services, etc ADO.net Enterprise features (Search, BCS, etc.) Threading  (No complex processing) P-Invoke IO Other sites x x x x x x x
Compiling vs. Executing Sandboxed Solutions Visual Studio 2010uses IntelliSense tohide full-trust types All code is compiled against the full API Thus, no “sandbox” check at compile time… only at runtime Workaround: change the Microsoft.SharePoint.dll project reference to reference the sandbox’s version [..]4serCodessembliesicrosoft.SharePoint.dll NOTE: Switch it back before deployment! Use this as a temporary test - do not deploy code that references the sandbox’s assembly  This is valid if you don’t have VS 2010 SP Power tools. MyWebPart.dll Runtime Full Object Model Subset Object Model Proxy
Execution vs. Compilation in Sandbox Demo
Load Balancing Sandboxed solutions can be run in two modes Local Mode Execute code on the SharePoint WFE Low administration overhead Lower scalability Remote Mode Execution on back-end farm machine Via dedicated service applications Load balanced distribution of code execution requests
Load balancing Sandbox Solutions & Blocking demo
Solution Validation [GuidAttribute("34805697-1FC4-4b66-AF09-AB48AC0F9D97")] publicclassPublisherValidator:SPSolutionValidator{ publicoverridevoidValidateSolution( SPSolutionValidationProperties properties){ properties.Valid = [true || false]; properties.ValidationErrorMessage = “no soup for you”; } publicoverridevoidValidateAssembly( SPSolutionValidationPropertiesproperties, SPSolutionFileassembly){ } }
Solution Validator demo
Monitored Resources You can tweak these values to fit your need…
Manage Sandbox solution resources demo
Summary Sandbox Solutions Overview SharePoint 2007 Challenges for Farm Solutions SharePoint 2010 Approach for Sandbox Solutions Sandbox Solutions Lifecycle Executing Code in the Sandbox Sandbox Solutions Limitations Sandbox Resource Monitoring Load balancing Sandbox solutions Solution Validation
Blog: http://moustaga-arafa.blogspot.com Twitter: @mostafaelzoghbi

More Related Content

What's hot

An introduction to microsoft power apps
An introduction to microsoft power appsAn introduction to microsoft power apps
An introduction to microsoft power appsMitul Rana
 
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyond
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyondDive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyond
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyondJason Himmelstein
 
SharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning ModelsSharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning ModelsShailen Sukul
 
SharePoint 2013 Sneak Peek
SharePoint 2013 Sneak PeekSharePoint 2013 Sneak Peek
SharePoint 2013 Sneak PeekShailen Sukul
 
Designing for SharePoint Provider Hosted Apps
Designing for SharePoint Provider Hosted AppsDesigning for SharePoint Provider Hosted Apps
Designing for SharePoint Provider Hosted AppsRoy Kim
 
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...NCCOMMS
 
SharePoint as Development Platform for the Modern Intranet
SharePoint as Development Platform for the Modern IntranetSharePoint as Development Platform for the Modern Intranet
SharePoint as Development Platform for the Modern IntranetHaaron Gonzalez
 
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...European Collaboration Summit
 
MS Project Server Beneficial Features
MS Project Server Beneficial FeaturesMS Project Server Beneficial Features
MS Project Server Beneficial FeaturesFaisal Masood
 
ECS19 - Damir Dobric - Designing and Operating modern applications with Micro...
ECS19 - Damir Dobric - Designing and Operating modern applications with Micro...ECS19 - Damir Dobric - Designing and Operating modern applications with Micro...
ECS19 - Damir Dobric - Designing and Operating modern applications with Micro...European Collaboration Summit
 
Building advanced Project Server workflows with Nintex Workflow for Project S...
Building advanced Project Server workflows with Nintex Workflow for Project S...Building advanced Project Server workflows with Nintex Workflow for Project S...
Building advanced Project Server workflows with Nintex Workflow for Project S...Alexander Burton
 
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...European Collaboration Summit
 
Overview PowerPlatform PowerApss
Overview PowerPlatform PowerApssOverview PowerPlatform PowerApss
Overview PowerPlatform PowerApssJuan Fabian
 
Deep Dive Building Office Mail Add-ins with the Microsoft Graph
Deep Dive Building Office Mail Add-ins with the Microsoft GraphDeep Dive Building Office Mail Add-ins with the Microsoft Graph
Deep Dive Building Office Mail Add-ins with the Microsoft GraphBram de Jager
 
SharePoint Intersections - SP11 - SharePoint and IaaS - The OnPrem in the Cloud
SharePoint Intersections - SP11 - SharePoint and IaaS - The OnPrem in the CloudSharePoint Intersections - SP11 - SharePoint and IaaS - The OnPrem in the Cloud
SharePoint Intersections - SP11 - SharePoint and IaaS - The OnPrem in the CloudDan Usher
 
App Model For SharePoint 2013
App Model For SharePoint 2013App Model For SharePoint 2013
App Model For SharePoint 2013Toni Il Caiser
 
SPCA2013 - Best Practices & Considerations for Designing Your SharePoint Logi...
SPCA2013 - Best Practices & Considerations for Designing Your SharePoint Logi...SPCA2013 - Best Practices & Considerations for Designing Your SharePoint Logi...
SPCA2013 - Best Practices & Considerations for Designing Your SharePoint Logi...NCCOMMS
 
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - RoadmapECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - RoadmapEuropean Collaboration Summit
 
Design and Implement Azure Web Apps
Design and Implement Azure Web AppsDesign and Implement Azure Web Apps
Design and Implement Azure Web AppsAyush Rathi
 
Patterns and Practices in Building Office Add-ins
Patterns and Practices in Building Office Add-insPatterns and Practices in Building Office Add-ins
Patterns and Practices in Building Office Add-insMostafa
 

What's hot (20)

An introduction to microsoft power apps
An introduction to microsoft power appsAn introduction to microsoft power apps
An introduction to microsoft power apps
 
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyond
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyondDive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyond
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyond
 
SharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning ModelsSharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning Models
 
SharePoint 2013 Sneak Peek
SharePoint 2013 Sneak PeekSharePoint 2013 Sneak Peek
SharePoint 2013 Sneak Peek
 
Designing for SharePoint Provider Hosted Apps
Designing for SharePoint Provider Hosted AppsDesigning for SharePoint Provider Hosted Apps
Designing for SharePoint Provider Hosted Apps
 
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
 
SharePoint as Development Platform for the Modern Intranet
SharePoint as Development Platform for the Modern IntranetSharePoint as Development Platform for the Modern Intranet
SharePoint as Development Platform for the Modern Intranet
 
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
 
MS Project Server Beneficial Features
MS Project Server Beneficial FeaturesMS Project Server Beneficial Features
MS Project Server Beneficial Features
 
ECS19 - Damir Dobric - Designing and Operating modern applications with Micro...
ECS19 - Damir Dobric - Designing and Operating modern applications with Micro...ECS19 - Damir Dobric - Designing and Operating modern applications with Micro...
ECS19 - Damir Dobric - Designing and Operating modern applications with Micro...
 
Building advanced Project Server workflows with Nintex Workflow for Project S...
Building advanced Project Server workflows with Nintex Workflow for Project S...Building advanced Project Server workflows with Nintex Workflow for Project S...
Building advanced Project Server workflows with Nintex Workflow for Project S...
 
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
 
Overview PowerPlatform PowerApss
Overview PowerPlatform PowerApssOverview PowerPlatform PowerApss
Overview PowerPlatform PowerApss
 
Deep Dive Building Office Mail Add-ins with the Microsoft Graph
Deep Dive Building Office Mail Add-ins with the Microsoft GraphDeep Dive Building Office Mail Add-ins with the Microsoft Graph
Deep Dive Building Office Mail Add-ins with the Microsoft Graph
 
SharePoint Intersections - SP11 - SharePoint and IaaS - The OnPrem in the Cloud
SharePoint Intersections - SP11 - SharePoint and IaaS - The OnPrem in the CloudSharePoint Intersections - SP11 - SharePoint and IaaS - The OnPrem in the Cloud
SharePoint Intersections - SP11 - SharePoint and IaaS - The OnPrem in the Cloud
 
App Model For SharePoint 2013
App Model For SharePoint 2013App Model For SharePoint 2013
App Model For SharePoint 2013
 
SPCA2013 - Best Practices & Considerations for Designing Your SharePoint Logi...
SPCA2013 - Best Practices & Considerations for Designing Your SharePoint Logi...SPCA2013 - Best Practices & Considerations for Designing Your SharePoint Logi...
SPCA2013 - Best Practices & Considerations for Designing Your SharePoint Logi...
 
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - RoadmapECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
 
Design and Implement Azure Web Apps
Design and Implement Azure Web AppsDesign and Implement Azure Web Apps
Design and Implement Azure Web Apps
 
Patterns and Practices in Building Office Add-ins
Patterns and Practices in Building Office Add-insPatterns and Practices in Building Office Add-ins
Patterns and Practices in Building Office Add-ins
 

Viewers also liked

Eugene Rosenfeld: SharePoint Custom Field Types
Eugene Rosenfeld: SharePoint Custom Field TypesEugene Rosenfeld: SharePoint Custom Field Types
Eugene Rosenfeld: SharePoint Custom Field TypesSharePoint Saturday NY
 
Kathryn Birstein: SharePoint 2010 Business Intelligence-Bringing it All Together
Kathryn Birstein: SharePoint 2010 Business Intelligence-Bringing it All TogetherKathryn Birstein: SharePoint 2010 Business Intelligence-Bringing it All Together
Kathryn Birstein: SharePoint 2010 Business Intelligence-Bringing it All TogetherSharePoint Saturday NY
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellSharePoint Saturday NY
 
Richard Harbridge: 7 SharePoint Success Factors
Richard Harbridge: 7 SharePoint Success FactorsRichard Harbridge: 7 SharePoint Success Factors
Richard Harbridge: 7 SharePoint Success FactorsSharePoint Saturday NY
 

Viewers also liked (6)

Alphonso Scarborough: Share point 101
Alphonso Scarborough: Share point 101Alphonso Scarborough: Share point 101
Alphonso Scarborough: Share point 101
 
Eugene Rosenfeld: SharePoint Custom Field Types
Eugene Rosenfeld: SharePoint Custom Field TypesEugene Rosenfeld: SharePoint Custom Field Types
Eugene Rosenfeld: SharePoint Custom Field Types
 
Kathryn Birstein: SharePoint 2010 Business Intelligence-Bringing it All Together
Kathryn Birstein: SharePoint 2010 Business Intelligence-Bringing it All TogetherKathryn Birstein: SharePoint 2010 Business Intelligence-Bringing it All Together
Kathryn Birstein: SharePoint 2010 Business Intelligence-Bringing it All Together
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
 
Alphonso Scarborough: SharePoint 101
Alphonso Scarborough: SharePoint 101Alphonso Scarborough: SharePoint 101
Alphonso Scarborough: SharePoint 101
 
Richard Harbridge: 7 SharePoint Success Factors
Richard Harbridge: 7 SharePoint Success FactorsRichard Harbridge: 7 SharePoint Success Factors
Richard Harbridge: 7 SharePoint Success Factors
 

Similar to Mostafa Elzoghbi: SharePoint 2010 Sanbbox Solutions bestpractices - public

Playing in the SharePoint SandBox
Playing in the SharePoint SandBoxPlaying in the SharePoint SandBox
Playing in the SharePoint SandBoxToni Frankola
 
Diff sand box and farm
Diff sand box and farmDiff sand box and farm
Diff sand box and farmRajkiran Swain
 
SharePoint 2010 Sandboxed Solution
SharePoint 2010 Sandboxed SolutionSharePoint 2010 Sandboxed Solution
SharePoint 2010 Sandboxed SolutionSrini Sistla
 
Best practices with SharePoint 2010 sandboxed solutions
Best practices with SharePoint 2010 sandboxed solutionsBest practices with SharePoint 2010 sandboxed solutions
Best practices with SharePoint 2010 sandboxed solutionsToni Frankola
 
How to build a cloud adapter
How to build a cloud adapterHow to build a cloud adapter
How to build a cloud adapterMaarten Smeets
 
SharePoint Saturday - Sandbox development
SharePoint Saturday - Sandbox developmentSharePoint Saturday - Sandbox development
SharePoint Saturday - Sandbox developmentElaine Van Bergen
 
SharePoint Development For Asp Net Developers
SharePoint Development For Asp Net DevelopersSharePoint Development For Asp Net Developers
SharePoint Development For Asp Net DevelopersCorey Roth
 
Best practices for share point solution deployment
Best practices for share point solution deploymentBest practices for share point solution deployment
Best practices for share point solution deploymentSalaudeen Rajack
 
Developer application lifecycle process and tools - v.5
Developer application lifecycle process and tools - v.5Developer application lifecycle process and tools - v.5
Developer application lifecycle process and tools - v.5Ivan Sanders
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourBrian Culver
 
Best Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsBest Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsAlexander Meijers
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastSharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastAyman El-Hattab
 
Getting started with spfx
Getting started with spfxGetting started with spfx
Getting started with spfxJenkins NS
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for DevelopersSarah Dutkiewicz
 
Moss 2007 Wcm Architecture And Development Best Practices In A Team Based E...
Moss 2007 Wcm Architecture And Development   Best Practices In A Team Based E...Moss 2007 Wcm Architecture And Development   Best Practices In A Team Based E...
Moss 2007 Wcm Architecture And Development Best Practices In A Team Based E...Karthik Venkataraman
 

Similar to Mostafa Elzoghbi: SharePoint 2010 Sanbbox Solutions bestpractices - public (20)

STUG-Sand boxed Solution
STUG-Sand boxed SolutionSTUG-Sand boxed Solution
STUG-Sand boxed Solution
 
Developing Sandbox Solutions
Developing Sandbox SolutionsDeveloping Sandbox Solutions
Developing Sandbox Solutions
 
Playing in the SharePoint SandBox
Playing in the SharePoint SandBoxPlaying in the SharePoint SandBox
Playing in the SharePoint SandBox
 
Diff sand box and farm
Diff sand box and farmDiff sand box and farm
Diff sand box and farm
 
SharePoint 2010 Sandboxed Solution
SharePoint 2010 Sandboxed SolutionSharePoint 2010 Sandboxed Solution
SharePoint 2010 Sandboxed Solution
 
Best practices with SharePoint 2010 sandboxed solutions
Best practices with SharePoint 2010 sandboxed solutionsBest practices with SharePoint 2010 sandboxed solutions
Best practices with SharePoint 2010 sandboxed solutions
 
How to build a Oracle cloud adapter SOA, Integration & API's
How to build a Oracle cloud adapter  SOA, Integration & API'sHow to build a Oracle cloud adapter  SOA, Integration & API's
How to build a Oracle cloud adapter SOA, Integration & API's
 
How to build a cloud adapter
How to build a cloud adapterHow to build a cloud adapter
How to build a cloud adapter
 
SharePoint Saturday - Sandbox development
SharePoint Saturday - Sandbox developmentSharePoint Saturday - Sandbox development
SharePoint Saturday - Sandbox development
 
SharePoint Development For Asp Net Developers
SharePoint Development For Asp Net DevelopersSharePoint Development For Asp Net Developers
SharePoint Development For Asp Net Developers
 
Best practices for share point solution deployment
Best practices for share point solution deploymentBest practices for share point solution deployment
Best practices for share point solution deployment
 
Developer application lifecycle process and tools - v.5
Developer application lifecycle process and tools - v.5Developer application lifecycle process and tools - v.5
Developer application lifecycle process and tools - v.5
 
Introducción al SharePoint Framework SPFx
Introducción al SharePoint Framework SPFxIntroducción al SharePoint Framework SPFx
Introducción al SharePoint Framework SPFx
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
 
Best Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsBest Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point Solutions
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastSharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
 
Getting started with spfx
Getting started with spfxGetting started with spfx
Getting started with spfx
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for Developers
 
Moss 2007 Wcm Architecture And Development Best Practices In A Team Based E...
Moss 2007 Wcm Architecture And Development   Best Practices In A Team Based E...Moss 2007 Wcm Architecture And Development   Best Practices In A Team Based E...
Moss 2007 Wcm Architecture And Development Best Practices In A Team Based E...
 

More from SharePoint Saturday NY

Sb chatterjee share point workspace 2010 in action
Sb chatterjee   share point workspace 2010 in actionSb chatterjee   share point workspace 2010 in action
Sb chatterjee share point workspace 2010 in actionSharePoint Saturday NY
 
Joel Oleson: SharePoint 2010 Upgrade Drill Down
Joel Oleson: SharePoint 2010 Upgrade Drill DownJoel Oleson: SharePoint 2010 Upgrade Drill Down
Joel Oleson: SharePoint 2010 Upgrade Drill DownSharePoint Saturday NY
 
Peter Ward: The True Power of SharePoint Designer Workflows
Peter Ward: The True Power of SharePoint Designer WorkflowsPeter Ward: The True Power of SharePoint Designer Workflows
Peter Ward: The True Power of SharePoint Designer WorkflowsSharePoint Saturday NY
 
Chris Geier: Information Management in SharePoint 2010
Chris Geier: Information Management in SharePoint 2010Chris Geier: Information Management in SharePoint 2010
Chris Geier: Information Management in SharePoint 2010SharePoint Saturday NY
 
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nycJohn Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nycSharePoint Saturday NY
 
John Burkholder: Disaster Recovery in SharePoint 2010
John Burkholder: Disaster Recovery in SharePoint 2010John Burkholder: Disaster Recovery in SharePoint 2010
John Burkholder: Disaster Recovery in SharePoint 2010SharePoint Saturday NY
 
Chris McNulty - Managed Metadata and Taxonomies
Chris McNulty - Managed Metadata and TaxonomiesChris McNulty - Managed Metadata and Taxonomies
Chris McNulty - Managed Metadata and TaxonomiesSharePoint Saturday NY
 
Chris McNulty: ECM/WCM Planning, Implementation and Migration Strategies
Chris McNulty: ECM/WCM Planning, Implementation and Migration StrategiesChris McNulty: ECM/WCM Planning, Implementation and Migration Strategies
Chris McNulty: ECM/WCM Planning, Implementation and Migration StrategiesSharePoint Saturday NY
 
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...SharePoint Saturday NY
 
Jaime Velez: SharePoint 2010 Social Computing
Jaime Velez: SharePoint 2010 Social ComputingJaime Velez: SharePoint 2010 Social Computing
Jaime Velez: SharePoint 2010 Social ComputingSharePoint Saturday NY
 
Matthew Vignau: Memory Management in SharePoint 2007 Development
Matthew Vignau: Memory Management in SharePoint 2007 DevelopmentMatthew Vignau: Memory Management in SharePoint 2007 Development
Matthew Vignau: Memory Management in SharePoint 2007 DevelopmentSharePoint Saturday NY
 
Geoff Varosky: Creating Custom Actions in SharePoint 2010
Geoff Varosky: Creating Custom Actions in SharePoint 2010Geoff Varosky: Creating Custom Actions in SharePoint 2010
Geoff Varosky: Creating Custom Actions in SharePoint 2010SharePoint Saturday NY
 
Susan Lennon: Building SharePoint Dashboards
Susan Lennon: Building SharePoint DashboardsSusan Lennon: Building SharePoint Dashboards
Susan Lennon: Building SharePoint DashboardsSharePoint Saturday NY
 
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best PracticesMostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best PracticesSharePoint Saturday NY
 
Scott Lavoie: Best Practices and Pain Points of SharePoint Training
Scott Lavoie: Best Practices and Pain Points of SharePoint TrainingScott Lavoie: Best Practices and Pain Points of SharePoint Training
Scott Lavoie: Best Practices and Pain Points of SharePoint TrainingSharePoint Saturday NY
 
Paul Galvin: Introduction to Infopath and Best Practices
Paul Galvin: Introduction to Infopath and Best PracticesPaul Galvin: Introduction to Infopath and Best Practices
Paul Galvin: Introduction to Infopath and Best PracticesSharePoint Saturday NY
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellSharePoint Saturday NY
 

More from SharePoint Saturday NY (17)

Sb chatterjee share point workspace 2010 in action
Sb chatterjee   share point workspace 2010 in actionSb chatterjee   share point workspace 2010 in action
Sb chatterjee share point workspace 2010 in action
 
Joel Oleson: SharePoint 2010 Upgrade Drill Down
Joel Oleson: SharePoint 2010 Upgrade Drill DownJoel Oleson: SharePoint 2010 Upgrade Drill Down
Joel Oleson: SharePoint 2010 Upgrade Drill Down
 
Peter Ward: The True Power of SharePoint Designer Workflows
Peter Ward: The True Power of SharePoint Designer WorkflowsPeter Ward: The True Power of SharePoint Designer Workflows
Peter Ward: The True Power of SharePoint Designer Workflows
 
Chris Geier: Information Management in SharePoint 2010
Chris Geier: Information Management in SharePoint 2010Chris Geier: Information Management in SharePoint 2010
Chris Geier: Information Management in SharePoint 2010
 
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nycJohn Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
 
John Burkholder: Disaster Recovery in SharePoint 2010
John Burkholder: Disaster Recovery in SharePoint 2010John Burkholder: Disaster Recovery in SharePoint 2010
John Burkholder: Disaster Recovery in SharePoint 2010
 
Chris McNulty - Managed Metadata and Taxonomies
Chris McNulty - Managed Metadata and TaxonomiesChris McNulty - Managed Metadata and Taxonomies
Chris McNulty - Managed Metadata and Taxonomies
 
Chris McNulty: ECM/WCM Planning, Implementation and Migration Strategies
Chris McNulty: ECM/WCM Planning, Implementation and Migration StrategiesChris McNulty: ECM/WCM Planning, Implementation and Migration Strategies
Chris McNulty: ECM/WCM Planning, Implementation and Migration Strategies
 
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
 
Jaime Velez: SharePoint 2010 Social Computing
Jaime Velez: SharePoint 2010 Social ComputingJaime Velez: SharePoint 2010 Social Computing
Jaime Velez: SharePoint 2010 Social Computing
 
Matthew Vignau: Memory Management in SharePoint 2007 Development
Matthew Vignau: Memory Management in SharePoint 2007 DevelopmentMatthew Vignau: Memory Management in SharePoint 2007 Development
Matthew Vignau: Memory Management in SharePoint 2007 Development
 
Geoff Varosky: Creating Custom Actions in SharePoint 2010
Geoff Varosky: Creating Custom Actions in SharePoint 2010Geoff Varosky: Creating Custom Actions in SharePoint 2010
Geoff Varosky: Creating Custom Actions in SharePoint 2010
 
Susan Lennon: Building SharePoint Dashboards
Susan Lennon: Building SharePoint DashboardsSusan Lennon: Building SharePoint Dashboards
Susan Lennon: Building SharePoint Dashboards
 
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best PracticesMostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
 
Scott Lavoie: Best Practices and Pain Points of SharePoint Training
Scott Lavoie: Best Practices and Pain Points of SharePoint TrainingScott Lavoie: Best Practices and Pain Points of SharePoint Training
Scott Lavoie: Best Practices and Pain Points of SharePoint Training
 
Paul Galvin: Introduction to Infopath and Best Practices
Paul Galvin: Introduction to Infopath and Best PracticesPaul Galvin: Introduction to Infopath and Best Practices
Paul Galvin: Introduction to Infopath and Best Practices
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Mostafa Elzoghbi: SharePoint 2010 Sanbbox Solutions bestpractices - public

  • 1. SP 2010 Sandboxed Solutions MostafaElzoghbi Sr. Software Engineer - C# MVP MetroStar Systems
  • 2. Agenda Sandbox Solutions Overview SharePoint 2007 Challenges for Farm Solutions SharePoint 2010 Approach for Sandbox Solutions Sandbox Solutions Lifecycle Executing Code in the Sandbox Sandbox Solutions Limitations Sandbox Resource Monitoring Load balancing Sandbox solutions Solution Validation
  • 3. Overview of the Sandbox Allows a subset of the full capabilities in the SharePoint API Secure – enforcing the sandbox Execute in a partially trusted environment Code executes in a special service process Subject to CAS Validation framework Provides way to do custom farm wide validation for the deployed packages Each solution is isolated to its site collection
  • 4. Defining the Sandbox Solution Administration - Quota/Blocked Solutions Subset Object Model External Process Code Access Security (CAS Policies)
  • 5. SharePoint 2007 Challenge Developers build custom solutions Administrators can only secure solutions with CAS Hard to control what is being done in custom code Biggest cause of SharePoint support cases: custom code
  • 6. SharePoint 2010 Approach Developers build custom solutions Site collection owners deploy, activate and implement the customizations Administrators leverage resource monitors to check site collection usage Automatic triggers “turn off” custom solutions in a site collection that are too expensive and taxing on the server
  • 7. Sandboxed Solutions Help Enterprises Sandboxed solutions are important because Hosted environments much easier to manage Reduces time to deploying custom solutions Removing process of getting code approved and deployed by IT (Dev-Staging-Production) Improves stability of SharePoint servers Now badly performing code isolated to site collection rather than potentially bringing down an entire server
  • 9. Site Collection Administration Solution Gallery -- _catalogs/solutions Empower Site Collection administrators
  • 12. Solution Administration Central Administration Block Solutions Quota Templates
  • 13. The Subset Object Model SPSite In general SPSite and below No SPSecurity No SPSite construction Common namespaces not available Microsoft.SharePoint.Administration Microsoft.SharePoint.WebControls SPWeb SPList SPListItem
  • 14. A Separate Process User Code Service : Started where WFE configured to run sandbox solutions.(SPUCHostService.exe) Sandbox Worker Process: where your actual code runs(SPUCWorkerProcess.exe) Sandbox Worker Process Proxy(SPUCWorkerProcessProxy.exe)
  • 15. Sandbox and Code Access Security AspNetHostingPermission, Level=Minimal SharePointPermission, ObjectModel=true SecurityPermission, Flags=Execution Sandbox My.dll wss_usercode.config Other.dll System DLL SharePoint DLL Full Trust SharePoint OM Subset OM
  • 16. Front end Back end Host Service ExecutionManager Sandboxing Architecture Worker Process Untrusted Code Subset Object Model Full Object Model
  • 17. Sandboxed Solutions Process 2 1 5 6 7 4 3 Per-WFE AssemblyCache RootSPWeb of SPSite <siteguid>ompany.intranet.webpart.wspoo.dll Solution gallery Web Part gallery Sandboxed Worker Process WebParts.wsp
  • 18. Types of Sandboxed Solutions Sandboxed Solutions Support Sandboxed solutions offer developers a subset of the SharePoint API available fully trusted solutions Site collection and site scoped Features Many XML constructs available: Modules, Lists, ContentTypes, etc. Client technologies to access external data – JavaScript, Silverlight etc. Offloading resource usage and access handling to client
  • 19. Best Practices: Sandbox Boundaries Off-box connections, http, web services, etc ADO.net Enterprise features (Search, BCS, etc.) Threading  (No complex processing) P-Invoke IO Other sites x x x x x x x
  • 20. Compiling vs. Executing Sandboxed Solutions Visual Studio 2010uses IntelliSense tohide full-trust types All code is compiled against the full API Thus, no “sandbox” check at compile time… only at runtime Workaround: change the Microsoft.SharePoint.dll project reference to reference the sandbox’s version [..]4serCodessembliesicrosoft.SharePoint.dll NOTE: Switch it back before deployment! Use this as a temporary test - do not deploy code that references the sandbox’s assembly  This is valid if you don’t have VS 2010 SP Power tools. MyWebPart.dll Runtime Full Object Model Subset Object Model Proxy
  • 21. Execution vs. Compilation in Sandbox Demo
  • 22. Load Balancing Sandboxed solutions can be run in two modes Local Mode Execute code on the SharePoint WFE Low administration overhead Lower scalability Remote Mode Execution on back-end farm machine Via dedicated service applications Load balanced distribution of code execution requests
  • 23. Load balancing Sandbox Solutions & Blocking demo
  • 24. Solution Validation [GuidAttribute("34805697-1FC4-4b66-AF09-AB48AC0F9D97")] publicclassPublisherValidator:SPSolutionValidator{ publicoverridevoidValidateSolution( SPSolutionValidationProperties properties){ properties.Valid = [true || false]; properties.ValidationErrorMessage = “no soup for you”; } publicoverridevoidValidateAssembly( SPSolutionValidationPropertiesproperties, SPSolutionFileassembly){ } }
  • 26. Monitored Resources You can tweak these values to fit your need…
  • 27. Manage Sandbox solution resources demo
  • 28. Summary Sandbox Solutions Overview SharePoint 2007 Challenges for Farm Solutions SharePoint 2010 Approach for Sandbox Solutions Sandbox Solutions Lifecycle Executing Code in the Sandbox Sandbox Solutions Limitations Sandbox Resource Monitoring Load balancing Sandbox solutions Solution Validation

Editor's Notes

  1. MostafaElzoghbiMetroStar SystemsSr. Software EngineerMCAD,MCSD,MCTS,C# MVPhttp://moustafa-arafa.blogspot.com
  2. In this demo will show:Use VS 2010 to create sandbox solutions.Deploy and configuration on the Sandbox solutions.Test deploy the sandbox solution.Go through the prerequisites to enable user code service on your farm. Enable User code service in your farm-- Tips: Don’t use WSP Builder menu for Sandbox solutions, use Retract,Deply…etc options from the Project properties menu.Try to do a change in UI and redeploy your wsp, the old webpart UI still cached, Resolve: Remove the webpart from webpart gallery.
  3. Inert: Not effectiveIt’s called also : Sandbox Solution model process: 4 phases: Upload stageActivation stageDeactivation stage: pages with web parts will shows an error message.Delete Stage: cant be deleted if the solution is activated. If deleted it goes to the site recycle bin and can be deleted or restored.Upgrade Stage
  4. Activate/ Deactivate/ Delete and restore.
  5. Path for the configuration for the sandbox solution is:C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14CONFIGFile name: wss_usercode.config
  6. How to get VS 2010 SP power tools:From VS tools -&gt; Extension manager and Top Ranked Extensions.
  7. Open SPSNYCDemo2Try to build - &gt; Get an error since the SPSecurity in not available in sandbox solutions.Change the project target to farm solution and try to build -&gt; 0 errors.This is only applied on: VS 2010 Power tools. This is your validation for Sandbox solutions.Details:http://visualstudiogallery.msdn.microsoft.com/en-us/8e602a8c-6714-4549-9e95-f3700344b0d9
  8. To show how to load balance the sandbox solutions:Central AdministrationSystem SettingsManage User Solutions All user requests will be executed on the same machine - &gt;Users’ requests are routed using solution affinity.Try to blocksharepoint solution and navigate to the webpart page. You will see the block message is appearing.
  9. Farm solution.
  10. Only 14 metric:http://msdn.microsoft.com/en-us/magazine/ee335711.aspx
  11. From Central admin -&gt; application management -&gt; Configure quotas and locks