RESTFul service works in IIS Express / VS2013 but

2019-09-11 03:17发布

问题:

I developed a RESTFul Web Service in VS 2013 and it works fine locally on IIS Express.

I publish to a package which I transfer to another PC and using IIS Manager I import the zip file as part of the Default Web Site.

Loading the url in a browser always leads to a "Server Error in Application" HTTP error 404 (or other 40x error).

I've tried to different implementations, one with svc file and one without. Also setting target framework in web.config = 4.0 and setting the Default Application pool to .Net V4.0

How do I get my service (which runs fine from Visual Studio) to work in IIS?

回答1:

I found an update from Microsoft to enable IIS 7.5 handlers to handle requests whose URLs do not end with a period

My Windows 7 would not install this update so I ran Windows update to apply many updates. Although none looked directly related to extensionless urls it did the trick.

I imported my application using IIS Manager as before and it works fine!



标签: asp.net rest iis