[Solved] HTTP Error 405.0-Method Not Allowed occurs in the Put operation of the REST service on IIS7.5

WebDAV is a set of extensions of the Hypertext Transfer Protocol (HTTP), which provides a standard for editing and file management between computers on the Internet. Using this protocol, users can perform remote basic file operations through the Web, such as copy, move, delete, etc. . In IIS 7.0, WebDAV is used as an independent extension module and needs to be downloaded separately. In IIS 7.5, WebDAV will be integrated. However, WebDav clicks Put and Delete. So the RESTful services (WCF Data Service, WCF Rest Service, ASP.NET Web API, ASP.NET MVC) deployed on IIS 7.5 are tragic. When a Put request is sent, an HTTP Error 405.0-Method Not Allowed error will occur. Solve The method is also very simple, add the following settings in Web.config:

<system.webServer>
  <modules>
    <remove name="WebDAVModule" />
  </modules>
  <handlers>
    <remove name="WebDAV" />
  </handlers>
</system.webServer>

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *