Saturday, May 30, 2009

Wcf svc mime type on IIS.

I have started exploring WCF. The first issue I have got into was that there is no .svc MIME map on  IIS7 on Vista. When I tried to locate the service I always had the same exception: "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."



In order to resolve this you need to run "\%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe -i". It will create required .svc mapping.

Regards,
Oleh

9 comments:

Anonymous said...

This fixed everything thanks. Just remember that on a Windows 7 x64 pc the directory string is different eg. "C:\Windows\Microsoft.NET\Framework64\v3.0\Windows Communication Foundation\" here you will find the .exe

Oleh Svintsitskyy said...

Thanks for the useful hint.

Regards,
Oleh

Anonymous said...

Thank you. it fixed the problem

Anonymous said...

Thankyou, it fixed the problem

Anonymous said...

If you don't have access to IIS, then this solution doesn't work. Take a look at http://www.ittraining.com.ar/post/Problemas-con-WCF-Deployment-localmente-funciona-pero-no-en-el-host.aspx . It recommends you to modify webconfig, I tried it and it worked like a charm.

Alberto said...

Many thanks for share the solution, I spent two dais looking for this.

PT said...

Thanks for sharing this solution. It worked.

John Verco said...

This is the one solution that worked. Thanks a million!

Anonymous said...

I have deployed the SVC service
http://www.quickbook.in/PMS/Reservation.svc bit it is being download i want to display it on browser but it is not . Can any body help me in this issue