ASP.NET Web API returns 404 for PUT only on some servers


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.

ModuleName IIS Web Core 
Notification 16 
HttpStatus 404 
HttpReason Not Found 
HttpSubStatus 0 
ErrorCode 2147942402 
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?



asked on Server Fault Apr 10, 2012 by Greg Bacchus

1 Answer


Some have WebDAV, which provides the PUT verb, and some don't.

As a best practice, you should ensure all the servers in all your farms have the same binaries installed. Having different binaries installed on different servers in the same farm is Not Good.

answered on Server Fault Apr 11, 2012 by TristanK

User contributions licensed under CC BY-SA 3.0