sanboxed solutions sharepoint 2010

14
SANDBOXED SOLUTIONS Salman Ghani (MCPD SharePoint 2010, MCTS MOSS) 5 th October 2011

Upload: salman-ghani

Post on 14-Jan-2015

2.073 views

Category:

Technology


1 download

DESCRIPTION

This is a presentation about Sanboxed solutions in SharePoint 2010.

TRANSCRIPT

Page 1: Sanboxed Solutions SharePoint 2010

SANDBOXED SOLUTIONS

Salman Ghani (MCPD SharePoint 2010, MCTS MOSS)5th October 2011

Page 2: Sanboxed Solutions SharePoint 2010

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

Page 3: Sanboxed Solutions SharePoint 2010

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

Page 4: Sanboxed Solutions SharePoint 2010

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

Page 5: Sanboxed Solutions SharePoint 2010

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

Page 6: Sanboxed Solutions SharePoint 2010

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

Page 7: Sanboxed Solutions SharePoint 2010

SANDBOXED SOLUTIONS IMPLEMENTATION

Page 8: Sanboxed Solutions SharePoint 2010

Development of Sandboxed

Support in Visual Studio

© 2011 www.salmanghani.co.uk. All rights reserved. 8

Page 9: Sanboxed Solutions SharePoint 2010

Develop IntelliSense Support No error messages if use wrong classes Instead run time exceptions

© 2011 www.salmanghani.co.uk. All rights reserved. 9

Page 10: Sanboxed Solutions SharePoint 2010

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

Page 11: Sanboxed Solutions SharePoint 2010

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

Page 12: Sanboxed Solutions SharePoint 2010

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

Page 13: Sanboxed Solutions SharePoint 2010

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

Page 14: Sanboxed Solutions SharePoint 2010

THANK YOU