Content Management System (CMS) News, Reviews, Events and Analysis.
 
 
 

How to Deploy SharePoint WebParts

There are several ways to skin the Webparts deployment cat, each with a few pluses and minuses. Thanks to Mark Harrison we have have a quick and pragmatic list of the options, complete with instructions.

Method 1 - manual

  • Copy assembly DLL to either
    - /bin directory for a given IIS virtual server (e.g., c:\inetpub\wwwroot\bin)
    - Global Assembly Cache (e.g., c:\windows\assembly)

  • Copy DWP file to C:\Inetpub\wwwroot\wpcatalog

  • Copy resources to
    - For GAC-registered parts, C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources
    - For Web Parts in the /bin directory, C:\Inetpub\wwwroot\wpresources

  • Adjust web.config
    - Register as SafeControl
    - Select Code Access Security settings


Method 2: CAB File

  • CAB file should contain
    -Assembly DLL
    -DWP file(s)
    -Manifest.XML
    -Resource files (if needed)
  • CAB won't contain
    - Code Access Security settings

  • Server-side object model has methods for deploying such a CAB file

  • Deploy with STSADM.EXE
    Located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN
    Add it to your path
    Stsadm -o addwppack -filename filename [-globalinstall] [-force]


Method 3: MSI File via WPPackager

  • All of the features of CAB file deployment, but with
    - Code Access Security support
    - Ability to uninstall via Control Panel

  • Get WPPackager.exe

  • Add additional files to project for use by WPPackager

  • Run WPPackager after project is built
 
Read More About:
, , ,
 
Was this article useful?
 

4 Reader Comments

1 | subha — December 17, 2007 4:55 AM

Hi,
Since my stsadm is showing an error, I thought of deploying webparts using irst method you suggested....but in the third step i cant get the meaning of the word "RESOURCES" that has to be copied. Kindly help me in this regard.

2 | BirdBuster — February 27, 2008 1:30 PM

I am having the same questions can't you clarify the word Resources its too broad.

Thanks,
Birdbuster

3 | kapil khadgi — January 9, 2009 6:21 AM

i thing Resources means any images or any other supporting file for that web part.

4 | dipali — March 26, 2009 4:26 AM

I think Rsource file contains key/value pairs. you have to include if it presents in your project. If you are not using it in your project, you need not worry about it. It is used for localization purpose.

Leave a Response

  Remember me?

Related Tips & Tricks Articles

 

From our Job Board  View all jobs | feed Jobs RSS feed | Post a job right now

 

Featured Events  View all events | feed Events RSS feed | Add your event

STAY UP TO DATE
Subscribe to our RSS feed...
SUBSCRIBE TO OUR RSS FEED