Presentation is loading. Please wait.

Presentation is loading. Please wait.

BIWUG | SPSaturday Sandboxed Solutions

Similar presentations


Presentation on theme: "BIWUG | SPSaturday Sandboxed Solutions"— Presentation transcript:

1 BIWUG | SPSaturday Sandboxed Solutions
BPIO TDM Customer Deck 7/24/2018 BIWUG | SPSaturday Sandboxed Solutions Steven Van de Craen Ventigrate © 2007 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2 SharePoint Solution Package SharePoint 2007
“A means to get what we developers have created onto a SharePoint Farm in an appropriate, supported and consistent manner” Cabinet Manifest, Assemblies, ASP.NET Pages and User Controls, ... Features, Site Definitions, ... SafeControl, CAS Policy Multi-Server Farm

3 SharePoint Solution Package SharePoint 2010
Farm Solution Sandboxed Solution “SP2007 Solution” concept Farm scoped Deployed by Farm administrators Full functionality ASP.NET Worker process New concept Site Collection scoped Deployed by Site Collection administrators Subset of functionality User Code Service process Inter-Package dependencies

4 Architecture Solution is unpacked into memory
Page requests, events and workflow need code to be executed in the sandbox User Code Service spawns a Worker process (one per site collection) Web Context is recreated in User Code Worker process HttpContext.Current SPContext.Current Life-cycle processed in the sandbox Web Context Result marshalled back to main thread

5 Usage Sandboxed solutions are important because
Solve SharePoint hosting issues in corporate environments Hosted environments much easier to manage Reduces time to deploying custom solutions Removing process of getting code approved and deployed by IT Improves stability of SharePoint servers Now badly performing code isolated to site collection rather than potentially bringing down an entire server

6 Subset of functionality Object Model
Current SPSite and below No SPSecurity VS 2010 Intellisense hides full-trust types Compiled against full API Runtime against sandbox API 14\UserCode\Assemblies Code Access Security wss_usercode.config No calls to Web Services, Databases, File System, … SPSite SPWeb SPList SPListItem

7 BPIO TDM Customer Deck 7/24/2018 Demo | Creating a Sandboxed WebPart Subset of functionality VS 2010 Intellisense Code Access Security © 2007 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

8 Subset of functionality Solution Elements
Supported Not supported List Definitions List Instances Content Types/Fields Navigation Module/files Features Web Parts Event receivers Custom actions Declarative workflows Visual Web Parts Application Pages Custom Action Group HideCustomAction element Content Type Binding Web Application-scoped features Farm-scoped features Workflows with code Resource: MSDN | Sandbox Solution Considerations

9 Full Trust Proxies Full Trust actions Deployed to GAC
Referenced by Sandboxed code

10 Resource Monitoring Farm administrators Site administrators Quotas
Set absolute limits Site administrators Identify expensive solutions Quotas The default resources are 300 14 factors Adjustable through SharePoint OM Server Resources: CPU, Memory, SQL, Exceptions, Critical Errors, Handles, Threads, ...

11 Resource Calculation Metric Name Description Units Resources Per Point
Hard Limit AbnormalProcessTerminationCount Process gets abnormally terminated Count 1 CPUExecutionTime CPU exception time Seconds 3,600 60 CriticalExceptionCount Critical exception fired Number 10 3 InvocationCount Number of times solution has been invoked N/A PercentProcessorTime Note: # of cores not factored in Percentage Units of Overall Processor Consumed 85 100 ProcessCPUCycles CPU Cycles 1E+11 ProcessHandleCount Windows Handles 10,000 1,000 ProcessIOBytes (Hard Limit Only) Bytes written to IO Bytes 1E+08 ProcessThreadCount Number of Threads in Overall Process Threads 200 ProcessVirtualBytes (Hard Limit Only) Memory consumed 1E+09 SharePointDatabaseQueryCount SharePoint DB Queries Invoked 20 SharePointDatabaseQueryTime Amount of time spent waiting for a query to be performed 120 UnhandledExceptionCount Unhanded Exceptions 50 UnresponsiveprocessCount We have to kill the process because it has become unresponsive 2 Sample: A Web Part executes SharePoint OM code which results in 40 database queries, this equals to 2 resource points. In a default Site Collection this means that this Web Part can execute 150 times before Quota has been reached.

12 Demo | Administration UI Solution Gallery Resource Quotas
BPIO TDM Customer Deck 7/24/2018 Demo | Administration UI Solution Gallery Resource Quotas © 2007 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

13 Summary Site Collection scoped Subset of functionality
Separate, sandbox process Full Trust Proxy Resource Monitoring

14 Online Resources and References
MSDN | Sandbox Solutions Tobias Zimmergren | Sandbox Solution Validation 21apps | 21Scrum for SharePoint Sahil Malik | Sandbox Solutions blog series CodePlex | SharePoint 2010 Sandboxed Solutions

15 Thank You


Download ppt "BIWUG | SPSaturday Sandboxed Solutions"

Similar presentations


Ads by Google