我在向其他域的Web API进行PUT和DELETE CORS请求方面遇到了一些麻烦。
我按照教程http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api#create-webapi-project编写了API。
GET和POST请求可以正常工作,但是DELETE和PUT不行。我收到了这个消息:
Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource.
当我按照ASP.NET Web API中支持PUT和DELETE的CORS建议,在WebConfig中添加代码后,我只得到了第一个错误。请问有人能帮我吗?