corsiis-7.5puthttp-deletewebapi2

CORS - Delete and Put are not working,


enter image description here

I did all the setting,

  1. Standerd web api config
  2. Added all origins
  3. AllowAnyMethod,AllowAnyHeader,SupportsCredentials,AllowAnyOrigin set to true
  4. From IIS 7.5 delegation , set values to Read/Write

but still not able to make Delete and Put APIs.

Thanks..


Solution

  • Your response doesn't contain any CROS Access-Control headers. Also, to work with DELETE and PUT method requests you should respond properly to the preflight OPTIONS request.

    See this answer for a simple (though slightly unsafe) solution.