This week I was troubleshooting a project that provided static JavaScript files from a WCF services. However I found that when running tests locally, my debugging tools indicated that the endpoint was not accessible and would result in this error:

HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.

My first check was to ensure that IIS mapping was setup correctly, and for my 64 bit machine there were, as I expected, three entries that appropriately matched the 'svc' extension with WCF.




In my particular case I had some doubts about the order IIS, WCF and .NET were installed on my PC and so I opted to re-register the script maps with IIS using the following command (open a command window as admin):

"%WINDIR%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r

…and success! This above solution was for .NET v3.0, for 4.x the following would be more appropriate:

"%WINDIR%\Microsoft.Net\Framework\v4.0.30319\aspnet_regiis" –i –enable
"%WINDIR%\Microsoft.Net\Framework\v4.0.30319\ServiceModelReg.exe" –r

Comment Section

Comments are closed.