Restrictions in SharePoint 2010 Sandboxed Solution – Part1

Home | Sandboxed Solution | Restrictions in SharePoint 2010 Sandboxed Solution – Part1

We all know that SharePoint 2010 Sandbox Solution is restricted and it has access to only the subset of functionalities available in Microsoft.SharePoint namespace. In this article, we’ll see restrictions imposed by Sandboxed solutions. Basically, the calls made by Sandboxed solution are routed through subset proxy, which in turn makes the calls to the full object model. In this case, the subset proxy brings in the restriction by exposing limited set of functionalities. Here is the list of API exposed by subset proxy.

No

Namespace

Restriction

1

Microsoft.SharePoint

All of the Microsoft.SharePoint namespace except the following

 

a)SP Site Constructor

b)SP Security Object

c)SPWorkItem and SPWorkItemCollection objects

d)SPAlertCollection.Add method

e)SPTransformUtilities Object

f)SPUserSolution and SPUserSolutionCollection objects

 

2

Microsoft.SharePoint.Utilities

All of the Microsoft.SharePoint.Utility namespace except the following :-

 

a)SPUtility.SendEmail method

b)SPUtility.GetNtFullNameandEmailFromLogon

3

Microsoft.SharePoint.WebPartsPage

All of Microsoft.SharePoint.WebPartsPage

Except the following

 

a)SPWebPartManager object

b)SPWebPartConnection object

c)WebPartZone Object

d)WebPartPage Object

e)ToolPart object

f)ToolPane Object

 

If we examine the restrictions carefully, we can infer that the capabilities of the core foundational object model is available in the Sandboxed Solutions. However the advanced capabilities like Search, BCS, Access Services and Excel Services are restricted.

Next, we’ll see what are all the SharePoint 2010 Project types supported by Sandboxed Solutions.

No

SharePoint projects supported by sandboxed solution

SharePoint projects not supported by sandboxed solution

1

Content Types / fields

2

Modules / files

Application pages

3

List definitions

Web application scoped features

4

List instances

Custom action group

5

Site definitions

HideCustomAction element

6

Web Template Features

Content type binding

7

Web parts (non-visual)

 

8

Feature Callouts

 

9

Declarative workflows

 

10

Custom actions

 

11

SPWebEventReceiver

 

12

SPListEventReceiver

 

13

SPItemEventReceiver

 

 

Here are few more restrictions. The code inside Sandboxed solution cannot perform the following operations:-

a) Cannot read/write to the file system

b) Cannot call the network

c) Cannot write to the Registry

d) Cannot call assemblies deployed out of Global Assembly Cache

The next part of the article would cover the CAS policy restrictions on Sandboxed solution

 Note:-

At this point of time, the Visual Web Parts can be created as Sandboxed Solutions with the help of Visual Studio Power Tools for SharePoint.

   

 Subscribe to my blog

One thought on “Restrictions in SharePoint 2010 Sandboxed Solution – Part1

Leave a Reply