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.
In the Web application that contains the Web API REST service, open the Modules tab, select Webdavmodule, and then right-click Delete, as shown in the figure above.
Once deleted, visit the website again and you can see that it works fine.
If IIS reports 500 errors for put and delete requests, you can try modifying Web. config to remove Webdavmodule:
<system.webServer>
<modules runallmanagedmodulesforallrequests= "true" >
<remove name= "Webdavmodule"/>
</modules>
<remove name= "WebDAV"/>
<remove name= "extensionlessurlhandler-integrated-4.0"/>
<remove name= "Optionsverbhandler"/>
<remove name= "Traceverbhandler"/>
<add name= "extensionlessurlhandler-integrated-4.0" path= "*." verb= "*" type= " System.Web.Handlers.TransferRequestHandler "precondition=" integratedmode,runtimeversionv4.0 "/>
</system.webServer>
Reference URL: HTTP://WWW.JINXULIANG.COM/BLOG/ARTICLE/READ/3348D442-9432-49D8-ABE9-2C64CE6436CD