Background
An HTTP error 405.0-method not allowed error occurred while requesting the put/post/delete operation of the REST service deployed on IIS7.5.
Issue
Solve
Add the following settings to the Web. config for WebAPI app:
<system.webServer> <modules> <remove name= "Webdavmodule"/> </modules>
Background knowledge
WebDAV is a set of extensions to Hypertext Transfer Protocol (HTTP) that provides the standard for editing and file management between computers on the Internet. This protocol allows users to perform remote basic file operations, such as copying, moving, deleting, etc. via the web.
In IIS 7.0, WebDAV is a standalone extension module that needs to be downloaded separately, and WebDAV will be integrated in IIS 7.5, but WebDAV has clicked on Put,post,delete.
So the RESTful service deployed on IIS 7.5 (WCF Data service,wcf Rest service,asp.net Web api,asp.net MVC) is tragic, and HTTP Error occurs when a put request is sent 405.0– Method not allowed error.
Resources
Http://www.cnblogs.com/shanyou/archive/2012/03/23/2414252.html
HTTP Error 405.0-method not allowed error resolution for Put/post/delete operation that requests a REST service deployed on IIS7.5