Site icon Tech Dreams

How To Fix: Missing SVC MIME Types and Script Mappings Required for WCF Web Services

Very tiring day today. We struggled almost 5 hours to configure a corrupted IIS 7 on Windows Vista to deploy one of our web applications(WCF Web Services + ASP.NET MVC based). Everything was alright on our development boxes but nothing is running is Vista based computer.

When we try to access any of the Web Services files(ex: http://localhost/appserver/myservice.svc) we were presented a hell a lot of errors like:

and many more error. I’ve not noted down all the errors.

Root Cause of the Problem

The root cause of the problem was the missing MIME type configurations and Script Mappings on IIS 7 that are required for serving web services.

Solution

First we tried fixing the missing MIME types & Script mappings by re-creating one by one by looking at the configuration of development boxes running on Windows XP. But it proved as a too difficult task and also we are not sure what are the configurations required on a Vista based IIS server.

To rescue us, one of my friends informed us about the Microsoft .NET Framework application ServiceModel Registration Tool  that automatically installs all the missing MIME types and Script Mappings required for serving WCF Web Servers.

So all we had to was to open a command prompt, navigate to the folder C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation and execute the following command.

ServiceModelReg.exe -i

Like a magic our Web Services are up and running :). Now it’s very relaxing after spending 5 frustrating hours debugging the issue.

Even though I’m exhausted today, I don’t want to miss blogging about this issue. I hope this article helps someone who is struggling with similar problem.

Exit mobile version