I have a ASP.net Web API, that I am trying to host on IIS 10 (Windows 10 Pro). If I access this Web API form Angular 2 app, I get the following error

XMLHttpRequest cannot load Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 500.

But, If I host the same Web API on the IIS 7 (Windows 7), I do not get the above error. Could someone please help me understand this problem. Why do I need to do on IIS 10 to get rid of this error.

6 Days
Discussion Span
Last Post by rproffitt

I recall there are rule and security changes from one to the other. We don't use IIS so I'm far from expert but it appears that message means you have work to do. I'll share the search I used to find priors but want to write no, I don't expect you to be able to sling a site from one IIS to another without some work.

Read a few from this search.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.