Saturday, June 26, 2010

Sharepoint 2010 Sandbox solutions

I would like to highlight about sandbox solutions available in sharepoint 2010.

Sandbox solutions are  a way where sharepoint solutions can be deplyod in safe envirenments. When we create a WSP package in sharepoint 2007, generally we are creating a batch file for using STSADM tool in order to install WSP package to farm. And those are full trust solutions. While sandbox solutions can directly be uploaded to site collection level using access rights of site collection administrator. It doesnt requires Farm server administrator.

Sandbox solutions are limited to site collection only. They are being stored @ solution gallary of top level site collection.


Sandbox solutions are loaded into a separate process (SPUCWorkerProcess.exe). This process is monitored and implements quotas and throttling to protect the farm from sandboxed solutions that perform harmful activities, such as running tight loops that consume CPU cycles.

FOR DEVELOPERS: in oder to debug sharepoint solutions you need to attach your visual studio solution to this process.

Capabilities of Sandbox Solutions

  • List Definitions
  • List Instances 
  • Onet.xml
  • WebTemplate feature elements (instead of Webtemp.xml) 
  • Content Types/Fields 
  • Navigation 
  • Module/files 
  • Feature callouts 
  • Web Parts 
  • Support for all Web Parts that derive from System.Web.UI.WebControls.WebParts.WebPart 
  • Event receivers 
  • SPItemEventReceiver 
  • SPListEventReceiver 
  • SPWebEventReceiver 
  • Custom actions 
  • Declarative workflows

What Sandbox solutions are not supporting
  • Visual Web Parts  
  • Application Pages 
  • Custom Action Group 
  • HideCustomAction element 
  • Content Type Binding 
  • Web Application-scoped features 
  • Farm-scoped features 
  • Workflows with code

Advantages of Sandbox Solutions

  • Solutions can be installed directly by site collection administrators, no need for farm administrator. (NOTE: DONT FORGET TO ACTIVATE SOLUTION AFTER UPLOADING)
  • No need to deploy from server. No server reset required (what? no IISReset??? :) ), what else a developer required!!!!
  • Testing could be achieved from test site collection itself @production server.

Limitations of Sandbox solutions
  • Not all kind of code will be permitted in sandbox solutions. (cannot create site collections, cannot create visual webparts, can not do any IO operations)
  • There is a special environment to execute sandbox solutions. Separate storage of the solution files, separate process that runs its code and separate memory to go with it.  This will increase overhead when there are plenty of sandbox solutions. If you have deployed same solution on multiple site collections and in case when u want to upgrade that solution, it needs to be done one by one.
  • Have to remove, re-add and re-configure web parts when switching between deployment methods of same solution
  • Cannot use Page.ClientScript to register scripts
  • No support to Microsoft.SharePoint.WebPartPages namespace.
  • Making web service calls over the internet, or accessing code that is not marked to allow partially trusted callers are not supported. You also can’t deploy files to disk or add assemblies to the GAC in a sandboxed solution, and security-related functionality, such as running RunWithElevatedPriviledges and other SPSecurity methods, is not allowed.
  • No support to SPUtility.SendEmail namespace for sending mails.



Related posts

Thursday, June 24, 2010


I would like to highlight few new things introduced in Sharepoint 2010.

LINQ - With SharePoint 2010, a new LINQ provider for SharePoint converts object operations into the correct SharePoint operations using the native CAML language that SharePoint understands.

List Enhancements - List is the basic data storage element in sharepoint environment. Below is the enhancement / New features intoduced in sharepoint 2010

XSLT List View web part is a new type of web part that lets you manipulate data in a flexible manner using SharePoint Designer. A designer can easily connect to a variety of data sources to display data as needed and also setup any required conditional formatting of data. The best part about this setup is that a member of the site who is later using this data through the browser can easily interact with the views of this data or create additional views.

Business Connectivity Services (visit for more details)

Silverlight Integration 

Sandbox Solutions (visit for more details). You can deploy sandboxed solutions to quickly and more securely solve business problems. Sandboxed solutions are like farm solutions except in the following ways: they are rights-restricted and have a more permissive deployment policy than farm solutions; they are limited to the site collection to which they are deployed; and their server resource usage is monitored against an administrator-controlled quota for the site collection.
Visio Services (visit for more details)

InfoPath Enhancements

InfoPath forms as native SharePoint forms both on the web and when offline from within the SharePoint Workspace client. InfoPath is becoming the common form designer for forms that can be ported to SharePoint and SharePoint Workspace. Some other improvements include the ability to call REST services as a data connection and having "cascading dropdowns". There was plenty of room for improvement with InfoPath - we look forward to making use of them.


Blogs and wikis

Below features are now added to Blog and Wikis

  • Content rating
  • Tagging
  • Feeds
  • Record Management can now work with them
Social Tagging and Rating

Activity Feeds

Social Bookmarking

Organization Browser


New Core Search Query Capabilities

  • Wildcard
  • suffix matchings
  • grouping of query items
  • logical operators
Enhanced Core Search Results

  • Content previewing for office documents
  • Filter search results by author, document types and others
Enhanced People Search: Phonetics

Enhanced People Search: Address Book Style Lookups

Enhanced People Search Results

FAST Integration


Metadata Management and Navigation : organize your navigation and also list views by using the metadata of your content

Location - Based Metadata : SharePoint 2010 supports location - based metadata so that if a user posts a document into a specifi c location, metadata is automatically fi lled in for the user.

Document Routing : Document can automatically be routed to perticular location when it gets uploaded based on the content types and set of rules.

Unique Document IDs: Each documents are now assigned a new ID in order to seach them quickly.

Taxonomy Services (visit for more details)

Document Sets : Set of different documents can be grouped into a single set of document and matadata, workflows and versions can be applied to them. They can also be exported into zip.


Standards and Browser Support : Extended support to Firefox and safari

One - Click Page Layout : Change layout of the page in single click

Enhanced Page Libraries: Now one can create folders in pages library

Sunday, January 3, 2010

Web services issues in MOSS 2007

Hi all,

I have created a webservice in my project and would like to share that code with you.

I followed the steps avaiable in IT tool box, ssahmed's blog.

As you will get all the steps and code from there, I would like to share what I learned from there.

I was getting following errors when I was adding reference to that webservice...

Thursday, December 31, 2009

Create MOSS 2007 workflow with Infopath 2007 in VS 2008

Hi guys,

Since 3 days I have been working with creation of sharepoint workflow with infopath form.

I got stuck with many of the codes, but thanks to my senious and ofcouse google and microsoft forums!!!

I followed the steps available in Sharepoint sdk, so I am now writing that steps.

Writing the problems i faced while creating application.

Problem #1: Made mistake while publishing infopath initiation form.

I didnt see at the steps avaiable in blogs to publish, and I published the form with the default value available in access path.

Actually it should be blank. It will prompt you to keep it blank or not. Kindly select yes in that.

Problem #2: Published the form at other location, instead of publishing it directly in project folder itself.

I published the Infopath form to c: directly and then copied that form from c: to my project folder. I dont know it is allowed to copy but I read it from some other post that It must be published at the project folder only. Please correct me if I am wrong.

Problem #3: I didnt place Element Files in feature.xml. So got an error saying the .xsn file not found in folder. Where Forms is the name of the folder where I published all the infopath forms.

Initially I didnt place that Element File in node. But now when i removed those nodes and deployed directly from VS 2008, It deployed successfully!!!!

Please ensure that u also are not getting any error like that. If so then place element file node in
node, It will work well!

Problem #4: Task List Content Type ID.. This was the most critical problem of mine...

Initially, when I dragged the create task activity, I kept MethodName createTask only. I mean I didnt follow the Create Task with content type procedure. Because of that I was not getting the Custom made infopath form for task edit.

Then I googled and found out that if we are not passing the contet type id then it is picking up some Workflow tasks' content type and inserting tasks in that content type. Then I used 0x01080100C9C9515DE4E24001905074F980F93160 content type id and changed method name create task with content types. It realy helped me a lot...

Logic is : Wcan configure edit item url of the Items in content type definition file. So that content type is having edit item url to be configured to WrkTaskIP.aspx page and that page is having Infopath form viewer webpart. Which will pick up the Infopath form assigned in

Hope u will get some help from this. :-)