ASP.NET Web API returns 404 for PUT only on some servers
Posted
by
Greg Bacchus
on Server Fault
See other posts from Server Fault
or by Greg Bacchus
Published on 2012-04-10T23:03:45Z
Indexed on
2012/04/10
23:31 UTC
Read the original article
Hit count: 363
Ok, I have been racking my brain and the internet for a solution to this. I just can't figure it out.
I have written a site that uses ASP.NET MVC Web API and all working nicely until I put it on staging server. The site works fine on my local machine and the dev web server. Both dev and staging servers are Win Server 2008 R2.
The problem is this: basically the site works, but there are some API calls that use the HTTP PUT method. These fail on staging returning a 404, but work fine elsewhere.
The first problem that I came across and fixed was in Request Filtering. But still getting the 404.
I have turned on tracing in IIS and get the following problem.
168. -MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName IIS Web Core
Notification 16
HttpStatus 404
HttpReason Not Found
HttpSubStatus 0
ErrorCode 2147942402
ConfigExceptionInfo
Notification MAP_REQUEST_HANDLER
ErrorCode The system cannot find the file specified. (0x80070002)
The configs are the same on dev and staging, matter of fact the whole site is a direct copy.
Why would the GETs and POSTs work, but not the PUTs?
Thanks
Greg
© Server Fault or respective owner