Tuesday, November 17, 2009

Configuring WCF on IIS7

Today I was configuring a clean Windows Server 2008 system. When I deployed a a WCF Service on IIS 7, I got the following message:

Server Error in Application “Default Web Site/...”
HTTP Error 404.3 - Not Found

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

The exception explains itself. IIS couldn’t find a correct handler for the *.svc extension for our WCF service.

Execute the following steps to make it work:

  1. Start the command window (cmd) as an Administrator.
  2. Navigate to:
    C:\windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\
  3. Run the following command: ServiceModelReg –i

No comments: