This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12218|Reply: 1

IIS DELETE PUT request 405 solution

[Copy link]
Posted on 5/6/2021 4:55:36 PM | | | |
After deploying to IIS service, I used Postman to test the request to delete the interface, and found the following error:

<h2>405 - HTTP predicates used to access this page are not allowed. </h2>
  <h3>The page you're looking for doesn't show up because an invalid method (HTTP predicate) was used when trying to access it. </h3>


solution

IIS does not support PUT and DELETE requests by default;

IIS rejects PUT and DELETE requests by default registration of a custom HttpModule called "WebDAVModule". WebDAV is an HTTP extension that assists in collaborative editing and management of online documents among multiple users. The extension enables applications to write files directly to the Web Server while supporting file locking and versioning.

Microsoft is a leading force in making WebDAV a standard, and it has implemented IIS support for WebDAV using a custom HttpModule. However, this registration (registered name: WcbDAVModule) will reject requests for HTTP methods to PUT and DELETE, and if our site does not need support for WebDAV, the registered HttpModule can be removed by configuring it.


Modify the web.config file as follows:

(End)




Previous:Redis uses Lua scripts for detailed explanations
Next:Introduction to the Logstash API interface
Posted on 9/22/2021 7:54:50 PM |
Learn to learn...
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com