15.3. Deploying and Configuring Your Custom Action

There are three steps to deploying your custom action:

  1. Add the assembly to the Global Assembly Cache.

  2. Deploy the custom.ACTIONS file.

  3. Update the web.config file.

15.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, since these assemblies are accessible to the entire SharePoint farm and run without any restrictions on what code is 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 to the Global Assembly Cache, open Windows Explorer and navigate to the C:\Windows\Assembly folder. Then, drag your DLL file into the folder, and it will automatically be added to the Global Assembly Cache. If you previously added your assembly to the Global Assembly Cache, you must restart IIS before your assembly will be recognized by SharePoint.

To restart IIS, open the Run dialog by clicking Start and choosing Run. Type iisreset into the Run box, and click OK.

15.3.2. Deploying ...

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.