MVC AttributeRouting With GET - Returning 405 - Method Not Allowed

前端 未结 1 1135
粉色の甜心
粉色の甜心 2021-01-14 03:03

I\'ve just been working on a new controller action method and I\'m a little confused why I\'m seeing a 405.

I have defined several GET attributed methods on my API a

相关标签:
1条回答
  • 2021-01-14 04:07

    You would need to decorate the Search action with one more attribute called System.Web.Http.HttpGetAttribute. For the reason behind this, you can take a look at my answer in the below post:

    405 when using AttributeRouting.PUTAttribute unless I also include HttpPutAttribute

    0 讨论(0)
提交回复
热议问题