WCF Service in IIS 7.0

By Mithun Bose at January 26, 2010 16:31
Filed Under: .NET Framework, Troubleshooting, WCF

Sometimes on hosting WCF service on IIS7.0 you might receive the following error

HTTP Error 404.3 – Not Found

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map. Detailed Error InformationModule StaticFileModule.

This happens when IIS7.0 doesn't know how to handle the .svc files. To fix this we need to register WCF with IIS7.0, following are the steps:

  1. Run Visual Studio 2008 Command Prompt as “Administrator”.
  2. Navigate to C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation.
  3. Run this command servicemodelreg –i.

The servicemodelreg is a command line tool which provides the ability to manage the registration on ServiceModel on a machine. There is more info on this commans on MSDN here.

 

About the author

I am a professional software developer based in London, England. I specialize in developing enterprise application and integration framework in C#, SQL Server, ASP.NET. 

My area of interests include SOA using WCF, Web, Business Intelligence and Database programming. I am a Computer Science Graduate and Microsoft Certified Professional Developer in enterprise application.