Sanboxed Solutions SharePoint 2010
-
Upload
salman-ghani -
Category
Technology
-
view
2.074 -
download
1
description
Transcript of Sanboxed Solutions SharePoint 2010
SANDBOXED SOLUTIONS
Salman Ghani (MCPD SharePoint 2010, MCTS MOSS)5th October 2011
Agenda
Introduction to Sandboxed Solutions What can be achieved? What is good? Limitations Implementation
Development Deployment Debugging options
© 2011 www.salmanghani.co.uk. All rights reserved. 2
Introduction to Sandboxed Solutions
A new concept in SharePoint 2010 for rapid deployments of solutions.
A sandbox is a restricted execution environment that enables programs to access only certain resources, and that keeps problems that occur in the sandbox from affecting the rest of the server environment.
This is as simple as uploading a solution to solutions library. © 2011 www.salmanghani.co.uk. All rights
reserved. 3
What can be achieved? Can access all classes under SPSite, SPWeb,
SPList and SPListItem Can create
web parts list definitions and list instances content types and fields modules workflows event receivers
Can read and write to the lists and libraries within same site collection
© 2011 www.salmanghani.co.uk. All rights reserved. 4
What is Good? Easy Deployment / Upgrade Activate / Deactivate Solutions No Server Reset Ideal for demonstration purpose on live
environments (Good for the business case) Good for developers Farm administrator can monitor and validate
solutions Easily convert to Farm solution Can be deployed by site collection
administrators© 2011 www.salmanghani.co.uk. All rights reserved. 5
Limitations No code with elevate permissions Cannot use visual web parts No access to internet to make web service
calls No access to hard drive for read/write files Cannot access code that is not marked for
partially trusted callers No deployments to GAC
© 2011 www.salmanghani.co.uk. All rights reserved. 6
SANDBOXED SOLUTIONS IMPLEMENTATION
Development of Sandboxed
Support in Visual Studio
© 2011 www.salmanghani.co.uk. All rights reserved. 8
Develop IntelliSense Support No error messages if use wrong classes Instead run time exceptions
© 2011 www.salmanghani.co.uk. All rights reserved. 9
Deployment
Just upload to the solutions library (Solutions library per site collections)
Activate the solution Easy Upgrade Deactivate Remove
© 2011 www.salmanghani.co.uk. All rights reserved. 10
Debugging
Code runs under sandboxed worker process Debug against SPUCWorkerProcess.exe Debug rest of the page against w3wp.exe
© 2011 www.salmanghani.co.uk. All rights reserved. 11
Load Balancing for Sandboxed
Local load balancing The sandboxed solution runs on the same server that
received the request Remote load balancing
The server that the sandboxed solution runs on is selected based on solution affinity, and the sandboxed solution is run on a server where it is already loaded and has already been run. This saves time in servicing the request for the solution.
© 2011 www.salmanghani.co.uk. All rights reserved. 12
Resources
Sandboxed solutions overview (Technet) http://technet.microsoft.com/en-us/library/ee7219
92.aspx
Developing, Deploying, and Monitoring Sandboxed Solutions http://msdn.microsoft.com/en-us/magazine/ee335
711.aspx
© 2011 www.salmanghani.co.uk. All rights reserved. 13
THANK YOU