When ajax is used in the program, the type is put, or the delete operation does not work on IIS. HTTP Error 405.0, ajax405.0 occurs.

Source: Internet
Author: User

When ajax is used in the program, the type is put, or the delete operation does not work on IIS. HTTP Error 405.0, ajax405.0 occurs.

In fact, put delete is basically used in creating webapis.

WebDAV is a set of extensions of Hypertext Transfer Protocol (HTTP). It provides standards for editing and file management between computers on the Internet. with this protocol, users can remotely perform basic file operations, such as copying, moving, and deleting files on the Web. In IIS 7.0, WebDAV is an independent extension module and needs to be downloaded separately. In IIS 7.5, WebDAV is integrated. However, WebDav puts Put and Delete the files to click. Therefore, RESTful services (WCF Data Service, WCF Rest Service, ASP. NET Web API, ASP. net mvc). When a Put request is sent, the HTTP Error 405.0-Method Not Allowed Error occurs, and the solution is simple,

Solution 1:

Add the following settings to Web. config:

<System. webServer>
<Modules>
<Remove name = "WebDAVModule"/>
</Modules>
<Handlers>
<Remove name = "WebDAV"/>
</Handlers>

</System. webServer>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.