16.01.2013 Views

Microsoft Sharepoint Products and Technologies Resource Kit eBook

Microsoft Sharepoint Products and Technologies Resource Kit eBook

Microsoft Sharepoint Products and Technologies Resource Kit eBook

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 31: Working with Web Parts 845<br />

More Info The white paper “<strong>Technologies</strong>: Building an Online Web Part Gallery,”<br />

by Nilly Banerjee (<strong>Microsoft</strong> Corporation, July 2003), details how to<br />

create an Online Web Part Page gallery as a central location for deploying<br />

Web Parts to multiple servers.<br />

Web Part Assembly Deployment<br />

You create Web Parts in C# or Visual Basic .NET by using the Web Part Library Template<br />

in <strong>Microsoft</strong> Visual Studio .NET as described in Chapter 37. This will be necessary<br />

if the built-in Web Parts do not meet your needs. These Web Parts are then<br />

compiled into assemblies; however, Web Parts are more than just the assemblies. A<br />

Web Part might have class resources such as images, JScript files, or Help files. These<br />

files might also be localized <strong>and</strong> deployed in locations that are different from the location<br />

of the Web Part. Additionally, the Web Part must be added to the SafeControl list<br />

for the specific virtual server before users can take advantage of its functionality.<br />

A Web Part package is a cabinet (.cab) file that contains the following items:<br />

■ Manifest.xml (m<strong>and</strong>atory)<br />

■ Web Part assemblies (optional)<br />

■ Class resource files (optional)<br />

■ .dwp files (optional)<br />

Developers can use either of the following methods to create a .cab file:<br />

■ Use Visual Studio .NET to create a CAB Project.<br />

■ Use MakeCAB.exe, a comm<strong>and</strong>-line tool included with Windows 2000 <strong>and</strong><br />

later.<br />

Visual Studio does not support creating .cab files with internal directories.<br />

However, localized Web Parts might require a .cab file with internal directories.<br />

Because of this, you must use a tool such as MakeCAB.exe or another third-party<br />

CAB utility to deploy localized Web Parts.<br />

Server Administrators can use the Stsadm.exe tool to deploy .cab files created<br />

by developers. Stsadm.exe is a comm<strong>and</strong>-line tool that you can use to manage a<br />

Windows SharePoint Services computer. The following three Stsadm.exe options<br />

apply to Web Part package deployment:<br />

■ AddWPPack<br />

■ DeleteWPPack<br />

■ EnumWPPacks

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!