MVC-Web API: 405 method not allowed

前端 未结 4 609
悲&欢浪女
悲&欢浪女 2020-11-29 08:51

So, I am stuck in a strange behavior, that is, I am able to send(or POST) data using Postman (plugin of chrome) or using RESTClient(extension of Firefox)<

4条回答
  •  一整个雨季
    2020-11-29 09:16

    WebApi probably blocks the CORS request. To enable CORS on WebApi, use the Microsoft.AspNet.WebApi.Cors package. For further details, check http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api

提交回复
热议问题