Tip

Managing sandbox solutions in SharePoint 2010

Microsoft has a new function in SharePoint 2010 that it calls “Sandbox” or “User Solutions,” which allows administrators and site collection owners to upload new functionality scoped to a single site collection. This means that site collection owners can host custom code or third-party add-ons that are useful to them without affecting others on the same farm.

This functionality is incredibly useful in situations where organizations have shared SharePoint farms that serve the needs of various groups.  It’s also useful if organizations are looking to leverage services like SharePoint Online -- which is a SaaS-based version of SharePoint -- but historically have been prevented from including custom code.

A site administrator or site collection owner can add user solutions through a new gallery option in Site Settings. Anyone who has worked with

    Requires Free Membership to View

SharePoint 2007 will already be familiar with the Web part, site template, master page/layout and content type galleries. The solution gallery is the latest edition. In this new gallery, user solutions for the site collection are stored.

In Figure 1, owners can quickly access the solution gallery and add specially written SharePoint solutions to their individual site collections.  These solutions are actually written a bit differently than 2007 solutions, in that the code must adhere to certain restrictions. Solutions are not permitted to execute operations that would affect either the server on which they run or cross the site collection boundary.

Figure 1:  The solution gallery for site collections

In the gallery, owners or administrators can see what solutions are loaded and can activate or deactivate them.  This reduces the administrative burden on folks managing SharePoint farms because it puts more administrative control into the hands of qualified users -- or specially designated owners of site collections.

Constraints and quotas
User solutions are scoped to the site collection.  This means that the code within the solution is restricted to running operations within the site collection to which it’s been deployed.  This constraint provides the first level of management because administrators don’t have to worry about solutions crossing site collections and running wild.

In addition to the site collection constraint, there are automatic quotas applied to all site collections. These quotas, like SharePoint 2007, have a storage component.  In SharePoint 2010, there is also a resource component related to user solutions.  By default, each site collection gets 300 quota points. Solutions use up the quota points by using farm resources.  Depending on the resource or operation, a specific threshold translates to a single quote point. 

For example, 3,600 seconds of CPU execution time translates to a single point. By contrast, a single abnormally terminated process also translates to a single quote point. A list of these thresholds can be found in the Sandbox Solutions architecture guide on MSDN.  

Managing Solutions
Management of solutions within a farm is a shared responsibility.  At the farm level, administrators set policy in the form of quotas. This means that although there’s a default 300-point quota for solutions, administrators can adjust that on a per-site collection basis.  

Furthermore, much like SharePoint 2007, administrators can create quota templates that include both storage and quota points. Once you establish a template, you can apply it to one or more site collections within a SharePoint application.  

Administrators also have the option of blocking solutions. If a specific solution appears to be consistently causing a problem, administrators can block solutions; which is done in Central Administration from the User Solution Management interface. This same management function also provides the ability to decide how the code is run -- all requests on the same machine or load-balanced across servers running the User Code Service.

At the Site Collection’s level, the solution gallery exposes reporting on quota usage for all solutions in this site collection. Although the interface does not provide a lot of management, site owners are shown how much of their quota has been consumed. In Figure 1, owners can see the daily usage as well as usage over the last 14 days.  They then have the option of shutting down or deactivating certain tools that may be consuming more resources than others.

Although SharePoint 2010 is still relatively new -- the information in this article is based on the beta version -- user solutions are a way to enable different groups to share a farm and provide the flexibility to deploy custom code, while allowing administrators to manage those add-ons.  Clearly, there are still challenges in this new model, but it helps administrators overcome the historical management and potential disaster of installing numerous custom applications in a shared farm.

Shawn Shell is the founder of Consejo Inc., a consultancy based in Chicago that specializes in Web-based applications, employees and partner portals as well as enterprise content management. He has spent more than 19 years in IT, with the last 10 focused on content technologies. Shell is a co-author of Microsoft Content Management Server 2002: A Complete Guide, published by Addison-Wesley, and he is the lead analyst/author on the CMSWatch SharePoint Report 2009.

This was first published in September 2010

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.