The requested resource does not support HTTP method 'GET'

前端 未结 5 656
你的背包
你的背包 2020-12-02 15:21

My route is correctly configured, and my methods have the decorated tag. I still get \"The requested resource does not support HTTP method \'GET\'\" message?



        
5条回答
  •  [愿得一人]
    2020-12-02 15:30

    just use this attribute

    [System.Web.Http.HttpGet]
    

    not need this line of code:

    [System.Web.Http.AcceptVerbs("GET", "POST")]
    

提交回复
热议问题