Publishing and testing a Windows Communication Foundation Service in IIS7 on Windows Vista is pretty straightforward, but there are a few pitfalls to look out for along the way. This post is designed to compliment the screencast ‘Creating and consuming your first WCF Service’ which I will publish here soon. I hope sharing this with you saves you some time when deploying your first service.
Firstly, install IIS7 from within ‘Programs and Features / Turn Windows features on or off’ if it isn’t already in the Administrative Tools menu.
Launch Internet Information Services from the Adminsitrative Tools menu and expand the nodes of the web site hosted on your local PC. Right click the name of the website and select ‘Add Application’

Enter the name of the ‘Virtual Directory’ you’d like to use for the service in the alias field and browse to the path of your service (containing the .svc file) in the physical path box. Upon adding the application, your IIS tree should look something like this:

Now it’s time to test the service you’ve created and added to IIS7. Navigate your web browser to http://localhost/CallService/CallService.svc (replace with whatever your service is called)
Here, you’ll see one of two things.
If your code is good and everything is configured correctly on the web server, you’ll see something like this in your browser:

If not, you may experience the following error:
Server Error in Application “Default Web Site/CallService”
HTTP Error 404.3 - Not FoundDescription: The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed.
To resolve this issue, you need to take the following steps:
1. Run a command prompt window as administrator. Start, cmd as normal then press CTRL+SHIFT+ENTER
2. Navigate to c:\windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\
3. Run the command ‘ServiceModelReg -i’ - You should receive the results below.
4. Exit

Ok, try navigating to your service again, http://localhost/CallService/CallService.svc
If you can see the service confirmation page above, this has worked, but you may receive the following error:
HTTP 500 — Handler svc-Integrated has a bad module “ManagedPipelineHandler” in its module list
After thourghly exploring the new IIS7 UI for a solution to this problem to no avail, it turns out that despite WCF being installed on Windows Vista machines as standard, HTTP activations aren’t by default.
To activate these, on your machine, follow these steps:
1. Control Panel / Programs and Features,
2. Turn Windows Features on or off / Install
3. Windows Communication Foundation HTTP Activation

This should solve the “HTTP 500 — Handler svc-Integrated has a bad module “ManagedPipelineHandler” in its module list” error.
You’re now ready to built or integrate a client application to test the WCF service.





One Comment
Thanks! This info helped me . In my case both steps were necessary: “ServiceModelReg -i” and “Windows Communication Foundation HTTP Activation”.