MSDN — Developing, Deploying, and Monitoring Sandboxed Solutions in SharePoint 2010

http://msdn.microsoft.com/en-us/magazine/ee335711.aspx

A Sharepoint solution is a deployable package that can contain features and assemblies. The solution package is a cab-based file with a wsp extension. Site collection admin can now upload, activate, delete and manage sandbox solutions using the Solution Gallery. (in Site Collection’s site settings page)


Solution Gallery is a standard list that stored WSP files. (_catalog/solutions) Deploying a Sandbox solution – uploading the *.WSP file and activate it. When you activate it, the site-collection level features are automatically activated. But you have to go to each site to activate the site-scope features. To upgrade a solution, create a new WSP package with a different filename but the same Solution ID
(in VS 2010). Sharepoint will prompt you to upgrade – the new is activated and old one de-activated.

Building a Sandboxed Web Part —
Sandbox solution’s assembly must be marked to allow partially trusted callers.
Two kinds of web part:
(1) Visual Web Part: Has *.ascx control, needs to be deployed to WFE, therefore cannot be a Sandbox solution.
(2) Web Part:

Full trust IIS Worker process – w3wp.exe.
Sandbox solutions: SPUCWorkerProcess.exe

*** Best way to reach out the sandbox is to create an External List using BCS. Or use a proxy
that is deployed as a farm solution.

Sharepoint Farm Admin can monitor and set quota on sandbox solutions.

Powershell to manage quota:
Get-SPSite | foreach-object {$_.Quota.UserCodeMaximumLevel = 300}
Get-SPSite | foreach-object {$_.Quota.UserCodeWarningLevel = 100}

Just to see the quota:
Get-SPSite | foreach-object {$_.Quota}

AbsoluteLimit – incremented each time a solution gets a point. If a solution exceeds the absolutelimit, it is terminated even if the daily limit is not reached.

Validating Solutions in Sandbox
Admin can validate and monitor solutions in sandbox. Farm admin can deploy solution validators
that run when a solution is uploaded/updated. Solution validator – derived from
SPSolutionValidator. The Validator must have a System.RunTime.InteropServices.GUID attribute assigned to it.

A signature property is assigned to the validator. Signature property
is used by Windows to determine whether the validator has changed.

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: