Search This Blog

Thursday, March 24, 2011

SharePoint 2010 Sandbox Execution flow

Before building solutions for the Sandbox you have to know how it actually works, that will also make you understand in more details why some things work and some don't.

1.The "real" Page object exists in the W3WP.exe process
2.The Sandboxed Execution Manager serializes information from the fully-trusted objects (see below)
3.The serialized is sent to the User Code Service (in the OnPageLoadComplete event). It can be on the same or a specific Sandboxed App Server
4.The User Code Service reuses or spins up a Sandbox Worker process and sends request to the worker process
5.The User Code Worker Process recreates a HttpContext and the Page object.
6.It then creates a Form, Web Part Manager and a Zone before it processes the page.
7.After processing the Sandboxed Page object it retrieves the Response, View State, Control State (execution depends on for instance it is a post-back, export of web part, edit web part etc)
8.Data is once serialized and sent back to the execution manager
9.The information is put back into the "real" objects (Web Part properties, view state, controls state...)


Serialized information

The information that is serialized includes but are not limited to:

•ID's of Form, Web Part Manager, Zone, Toolpane
•Web Part properties
•Options and properties of the Web Part and zone, such as chrome, zone customization, width, height...
•View state
•Control state
•Server Variables (except APPL_PHYSICAL_PATH and PATH_TRANSLATED)
•Request Headers
•Input Stream
•Current context (List Id, Item Id)
•Query String

No comments:

Post a Comment