Hosting a WCF Service using IIS7 and Windows Vista

Freshness Warning
This post is more than 4 years old. Please bear in mind its age when reading.

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'

 

Server Error in Application "Default Web Site/CallService" HTTP Error 404.3 - Not Found Description: 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:

Run a command prompt window as administrator. Start, cmd as normal then press CTRL+SHIFT+ENTER

Navigate to c:\windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\

Run the command 'ServiceModelReg -i' - You should receive the results below.

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.

 

 

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:

 

I'm running the 39th BMW Berlin Marathon on 30th September 2012 for the British Lung Foundation, who are currently funding research on the prevention of lung damage in COPD and many other areas related to lung disease.

I'm participating with my sister Claire Kewney and, on behalf of the charity, would appreciate even the smallest donation. My own JustGiving page is here, our team page is here.

if you're in the UK, you can also donate using your mobile phone by texting NKEW82 £5 (or any amount) to 70070. Your donation will be appreciated!

Comments

Your Comment
Your Name
E-mail Address (This won't be published)
Website URL

You can manage your Kewney.com account by logging in. [ Log On ]