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

后端 未结 4 907
时光取名叫无心
时光取名叫无心 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:49

    Open your website's Handler Mappings in IIS Manager

    Edit each handler you want to DELETE with, clicking Request Restrictions, choosing the Verbs tab, then add DELETE to the "One of the following" list or, if appropriate within your concerns, allow all verbs.

    You might need to restart your website and/or recompile your code

提交回复
热议问题