Issue in Enabling CORS for Web API 1, .net 4.0
问题 I need to enable CORS for my Web API and I can't upgrade to Framework 4.5. I've tried to add the following to my Web.config to see if it worked, but it didn't: <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Headers" value="Accept,Content-Type,X-Requested-With"/> I am accessing the URL http://localhost:8484/api/values/ from ajax call and getting bellow error XMLHttpRequest cannot load http://localhost:8484/api/values. Response to preflight request doesn't