Why does HTTP DELETE verb return 405 error - method not allowed for my RESTful WCF service running on IIS 7.5?

后端 未结 4 892
时光取名叫无心
时光取名叫无心 2021-02-05 02:22

Can anyone shed any light on this? I feel like I have wasted the entire day today hunting and searching the internet for any scrap of information about how to do this. I have

4条回答
  •  一整个雨季
    2021-02-05 02:54

    I just spent a ton of time trying to figure out why I kept getting 405 Method Not Allowed when using the DELETE verb. Everything I read said to uninstall WebDAV from IIS, but that seemed to break IIS in that all sites gave 503 errors. I reinstalled it, then went about looking in IIS for some setting.

    It turns out that WebDAV is the problem, and it has a node on the IIS features page named "WebDAV Authoring". Clicking on that lets you then click on WebDAV Settings... to get the properties page. In the section Request Filtering Behavior, set Allow Verb Filtering to False seemed to do the trick for me (YMMV).

    This seemed to be a popular result when googling for a solution, so I thought I'd add to the list of suggested solutions.

提交回复
热议问题