Pages

Tuesday, November 27, 2007

Deploying web part on virtual server gallery

These steps are more specific to the windows share point server 2003 & web part developed in ASP.net 2003:

1.) Open the web part project in visual studio

2.) Choose file -> Add Project -> New Project -> Setup and deployment project -> Add -> Project Output

3.) Select the setup project in the solution explorer and choose project ->Add - > Project output.

4.) Select Primary output and content files from the web part project and choose OK, visual studio adds those items to the setup project.

5.) Choose Build -> Rebuild Solution (By doing this visual studio rebuilds the web part assembly and package the assembly and content files in the CAB file)

6.) Copy the resulting CAB file to the webparts folder

7.) Run stsadm.exe to install the CAB file on the server.

You can locate stsadm.exe file at following location:

C:\program files\common files\Microsoft shared\web server extension\60\bin\

You can run following command using command prompt

Stsadm - o addwppack - filename "c:\inetpub\wwwroot\Calendar.CAB"
This will install Calendar web part to the "Bin" directory of the virtual server. And this will be available to drag and drop in share point server 2003 under Virtual Gallery section.

For removing a web part from the list we have to use following command on the command prompt.

Stsadm-o deletewppack -name "Calendar.CAB"

No comments: