16.3. Deploying and Configuring Your Web Part

There are three steps to deploying your Web Part:

  • Add the assembly to the Global Assembly Cache.

  • Update the web.config file.

  • Add your Web Part to the Web Part gallery.

16.3.1. Adding the Assembly to the Global Assembly Cache

The Global Assembly Cache stores assemblies that are shared among server processes. Most SharePoint-related assemblies must be placed in the Global Assembly Cache before SharePoint can use them. This restriction also applies to custom actions. However, placing assemblies in the Global Assembly Cache can be very dangerous because the assemblies are accessible to the entire SharePoint farm and run without any restrictions on the code allowed to run inside SharePoint. You can reduce this risk by examining the code of all assemblies to be placed in the Global Assembly Cache, including those from third parties. It is better to err on the side of caution than to risk the health and stability of your SharePoint farm.

To deploy the assembly, open Windows Explorer and navigate to the c:\windows\assembly folder. Drag your DLL file into the folder, and it is automatically added to the Global Assembly Cache. An easy way to find the location of your compiled DLL is to check the Output window in Visual Studio. If you cannot see the Output window, select View Output in Visual Studio. Make sure the dropdown list in the Output window ...

Get Professional Microsoft® SharePoint® Designer 2007 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.