SharePoint Custom Web Service Updates Not Found

Scenario: You’ve made updates to your custom web service and pushed them to the web server.  You re-compile your project, but your changes aren’t available.

Solution: The custom web service resides in the GAC.  Along with compiling the project and deploying the DLL you must register it with the GAC.  Here are the steps to follow

Step 1: Compile your project into a DLL and deploy the DLL on the server

Step 2: Register the DLL with the GAC

  1. Open the Visual Studio command prompt, click Start, click All Programs, click Microsoft Visual Studio 2010, click Visual Studio Tools, right-click Visual Studio Command Prompt, and click Run as administrator.
  2. At the command prompt, type gacutil.exe -if “<Full file system path to DLL>”
  3. Hit enter

Step 3:  Restart IIS to clear the cache and refresh the DLL

Step 4: In your Visual Studio project that references the Web service

  1. Right click on the Web Reference and click “Update Web Reference”

Step 5: Recompile your main project that references the custom web service

And that should do it.  If you want to confirm that your custom service has been installed after running gacutil.exe view the assemblies typicall found in the folder C:\Windows\assembly

Leave a Reply

Your email address will not be published. Required fields are marked *