Presentation is loading. Please wait.

Presentation is loading. Please wait.

Doug Perkes Senior Consultant Microsoft Corporation.

Similar presentations


Presentation on theme: "Doug Perkes Senior Consultant Microsoft Corporation."— Presentation transcript:

1 http://www.azsharepointpros.com Doug Perkes Senior Consultant Microsoft Corporation

2 http://www.azsharepointpros.com  Why do we need Sandboxed Solutions?  What is the Sandbox?  How does the Sandbox work?  How do I build a Sandboxed Solution?  What are the restrictions on a Sandboxed Solution?  How are Sandboxed Solutions managed?

3 http://www.azsharepointpros.com  Ask them to change the production farm trustLevel to Full.  Ask them to make hand edits to the web.config files in the production farm.  Forget to compile your production code in Release mode.  Forget to run SPDisposeCheck against your assemblies before deployment.  Tell them everything has to go in the GAC.

4 http://www.azsharepointpros.com

5 http://www.azsharepointpros.com

6 http://www.azsharepointpros.com

7 http://www.azsharepointpros.com  Content Types, Site Columns  Custom Actions  Declarative Workflows  Event Receivers, Feature Receivers  InfoPath Forms Services (not admin-appr) JavaScript, AJAX, jQuery, Silverlight  List Definitions  Non-visual web parts  Site Pages  SharePoint OnLine/Office 365

8 http://www.azsharepointpros.com  A separate process where the solution runs  Exposes a subset of Microsoft.SharePoint  Code Access Security policy limits functionality  Site Collection Solution Gallery for deployment  Central Administration for managing and monitoring solutions

9 http://www.azsharepointpros.com  User Code Service (SPUCHostService.exe)  Sandbox Worker Process (SPUCWorkerProcess.exe)  Sandbox Worker Process Proxy (SPUCWorkerProcessProxy.exe)

10 http://www.azsharepointpros.com  Microsoft.SharePoint Except SPSite constructor SPSecurity object SPWorkItem and SPWorkItemCollection objects SPAlertCollection.Add method SPAlertTemplateCollection.Add method SPUserSolution and SPUserSolutionCollection objects SPTransformUtilities  Microsoft.SharePoint.Navigation  Microsoft.SharePoint.Utilities Except SPUtility.SendEmail method SPUtility.GetNTFullNameandEmailFromLogin method  Microsoft.SharePoint.Workflow  Microsoft.SharePoint.WebPartPages Except SPWebPartManager object SPWebPartConnection object WebPartZone object WebPartPage object ToolPane object ToolPart object

11 http://www.azsharepointpros.com  SharePointPermission.ObjectModel  SecurityPermission.Execution  AspNetHostingPermission.Level = Minimal Note: A fully-trusted “proxy class” can be created to gain access to additional resources

12 http://www.azsharepointpros.com Site Collection Library Located at _catalogs/solutions Upload, activate, deactivate

13 http://www.azsharepointpros.com Solution Administration Block Solutions Quota Templates Resource Monitoring

14 http://www.azsharepointpros.com

15 http://www.azsharepointpros.com FRONT END BACK END

16 http://www.azsharepointpros.com FRONT END BACK END

17 http://www.azsharepointpros.com FRONT END BACK END

18 http://www.azsharepointpros.com FRONT END BACK END Run for 30sec

19 http://www.azsharepointpros.com SandboxSandbox AspNetHostingPermission, Level=Minimal SharePointPermission, ObjectModel=true SecurityPermission, Flags=Execution Full Trust User Code Framework Code SharePoint OM Subset OM

20 http://www.azsharepointpros.com

21 http://www.azsharepointpros.com

22 http://www.azsharepointpros.com Load Balancing ValidationMonitoring Resource Restriction

23 http://www.azsharepointpros.com Partial Trust can be run in two modes  Local Mode  Execute code on WFE  Low administration overhead  Lower scalability  Remote mode  Execute on back-end farm machine  Load balanced distribution of code execution requests  Create custom Load balancers

24 http://www.azsharepointpros.com [GuidAttribute("34805697-1FC4-4b66-AF09-AB48AC0F9D97")] public class PublisherValidator : SPSolutionValidator{ [Persisted] List _allowedPublishers; public override void ValidateSolution( SPSolutionValidationProperties properties){ } public override void ValidateAssembly( SPSolutionValidationProperties properties, SPSolutionFile assembly){ }

25 http://www.azsharepointpros.com  Farm Administrators  Set absolute limits  Site Administrators  Identify expensive solutions Server Resources: CPU, Memory, SQL, Exceptions, Critical Errors, Handles, Threads, …

26 http://www.azsharepointpros.com Central Admin Solution Gallery Measured in ‘Resource Points’

27 http://www.azsharepointpros.com

28 http://www.azsharepointpros.com  Sandboxed Solutions balance agility and stability  The Sandbox is a separate process  Sandbox Solutions are the preferred solution  Visual Studio 2010 is the tool for building Sandboxed Solutions  Sandbox Solutions are restricted by CAS and the API subset  Sandboxed Solutions are managed in CA

29 http://www.azsharepointpros.com  Content Types, Site Columns  Custom Actions  Declarative Workflows  Event Receivers, Feature Receivers  InfoPath Forms Services (not admin-appr) JavaScript, AJAX, jQuery, Silverlight  List Definitions  Non-visual web parts  Site Pages  SharePoint OnLine

30 http://www.azsharepointpros.com


Download ppt "Doug Perkes Senior Consultant Microsoft Corporation."

Similar presentations


Ads by Google