Tuesday, January 17, 2012

Deployment of Sharepoint sandbox solution wsp


Manually Deployment of Sharepoint sandbox solution wsp 


One of the most interesting new feature of SharePoint 2010 is something called Sandboxed Solutions.
Think of it this way. In 2007 we have solution packages, WSP files that are packaged up with all kinds of goodness (Master Pages, InfoPath Forms, Web Parts, Custom Actions, etc.). Whenever we want to deploy these, we need to hunt down our IT guy and hand him over the package to run on the server and deploy, using the farm account. Only then can we activate the feature on our site or site collection. And then there’s the hassle of retracting, redeploying, etc. for upgrades.

But the Question is how to deploy Sharepoint sandbox solution 

here is the two different approach for this :)

Approach 1: 


Go to Site Actions->Site Settings and under Galleries


Click on Solutions

Click on image to zoom

On next window click to upload solution

Click on image to zoom

Now upload your solution wsp

Click on image to zoom
 
After uploading on next window you can activate it

Click on image to zoom

Now your solution is activated. You can use it.


If you want to delete or deactivate it click on the solution deactivate option will appear after deactivate you can delete it.

Click on image to zoom
 

Manually Deployment of Sharepoint sandbox solution wsp 


Approach 2: 


SharePoint 2010 Management Shell (PowerShell is the most interactive approach in Sharepoint 2010) (for more about PowerShell read my another article Sharepoint Administration MGMT
 

Using PowerShell deploying sandbox solution

You can find Sharepoint 2010 Management Shell under Start-Microsoft Sharepoint 2010 Products

Click on image to zoom

On Management Shell window write command to add the solution to your site collection

Command :

Add-SPUserSolution –LiteralPath "C:\Deployment\MySharePointSolutionPackage.wsp" –Site http://webapplication/sitecollection

-LiteralPath : Path of Wsp file

-Site : Site collection url

Click on image to zoom

Hit enter it will add the solution to your site collection


You can see the added solution “testproject1” 


Site Actions->Site Settings and under Galleries-Solution

You can find your solution but it’s not activated

Click on image to zoom


To activate Solution 


On Management Shell window write command to Install the solution to your site collection

Command :

Install-SPUserSolution –Identity MySharePointSolutionPackage.wsp –Site http://webapplication/sitecollection

-identity : Name of the wsp file  


Hit enter it will show the status Activated

Click on image to zoom

 
Now you can see you webpart status is activated.

Click on image to zoom

--
Related Article : Creating a sandboxed solution

No comments: