I can access my Web API 2 service when I run it from VS 2013 (localhost:22532) and I have tested that CORS is working by adding/removing the [EnableCors(origins:"http://localhost:11705", headers: "*", methods: "*"] and running it in a Chrome browser using "http://localhost:11705". It responds as expected.
But when I deploy it to IIS 7.5 (http://localhost:8020), I continually get:
XMLHttpRequest cannot load http://localhost:8020/api/DataService/GetNavigationLocationInfo?userId=24&roleId=9. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:11705' is therefore not allowed access.
Is there some setup issue I am missing on IIS 7.5?
Headers:
- Request URL: http://localhost:8020/api/DataService/GetNavigationLocationInfo?userId=24&roleId=9</div>
There is no response showing in debug window.