Method One: Configure the C:\Windows\System32\inetsrv\Config\applicationHost.conf Put,delete
Method Two: The most widely used method, modify the project's Web. config file, paste the following code in <system.webServer></system.webServer>, remove Webdavmodule
<modules runallmanagedmodulesforallrequests="true"> <remove name="Webdavmodule"/> </modules> "php_via_fastcgi"/> <remove name="WebDAV"/> <add name="php_via_fastcgi"Path="*.php"verb="Get,head,post,put,detele"modules="Fastcgimodule"Scriptprocessor="C:\Program Files (x86) \php\v5.6\php-cgi.exe"Resourcetype="either"requireaccess="Script"/> Note that the PHP root directory of the scriptprocessor to correspond to the environment
Method Three: The second-wide network of methods, but also the most unreliable, a statement on the 503 method, I do not have WebDAV locally, so this time did not try this method.
The reason for this is that IIS installs a WebDAV module by default, and this module blocks HTTP put and delete requests.
As a result, the workaround is simple, in the Web site where you have deployed the Internet API, remove the WebDAV module.
As shown in the Web application, which contains the web API REST service, open the Modules tab, check "Webdavmodule", and right click on "Delete".
Once deleted, visit the website again and you can see that it works fine.
Method Four: This is the method I use, not mentioned on the Internet, so write this essay,
1. Click on handler Mappings
2. Select Php-cig, edit request limit
3. Add Put,delete
After you confirm, you may receive the following error,
Then restart IIS and try the put request successfully!
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
PHP put,delete request 404 on IIS