IIS broken when WSUS/WID role removed from server

We set up a site in IIS on a Windows Server machine that had been configured with the WSUS/WID role. After the site was up and running, we removed the WSUS/WID role on the server. Thereafter, the IIS site was returning “HTTP Error 500″

Removing the WSUS role on the server removes almost all the files installed by the Windows Update Services but does not undo the changes to the configuration written in the ApplicationHost.config file. The Applicationhost.config file tries to call the .dll installed by the WSUS Server which no longer exists on the system.

From the Applicationhost.config file:

<scheme name=”xpress” doStaticCompression=”false” doDynamicCompression=”true” dll=”C:\Program Files\Update Services\Webservices\suscomp.dll” staticCompressionLevel=”10″ dynamicCompressionLevel=”0″ />

Running the following command will remove all references to the module installed by WSUS.

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-[name='xpress']