1

When I add this header to my jQueryAjax request:

headers: {
    "Authorization": "SomeValue"
}

on the server I add the Authorization header to the

h.Add("Access-Control-Allow-Headers","Authorization");

This works fine in other browsers but not in IE10!

Options Preflight request

ONE REMARK:

If I comment out the authentication header, refresh the page, issue a regular GET request to my web api which by default does not trigger a preflight request. After that request, I uncomment the custom header in my jquery request, save, refresh the page, issue a new request with a custom header, which then executes successfully !

In IE 10 web developer tools I can see an error message:

SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied

SEC7118: XMLHttpRequest for https://mywebapi.dev/api/authentication/cors/ required Cross Origin Resource Sharing (CORS). cors SEC7119: XMLHttpRequest for https://mywebapi.dev/api/authentication/cors/ required CORS preflight. cors SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.

The request is aborted right away, it never reaches the message handler!

Legends
  • 21,202
  • 16
  • 97
  • 123

1 Answers1

1

This is already answered here and explained by @EricLaw in the anser/comment section. I found it now, because I googled the error code

SCRIPT7002

What I have done is:

  1. I went to IIS where my webapi is hosted and
  2. Click/mark my web application which is hosting my webapi and
  3. Go to SSL Settings-> Check Ignore Client Certificates!.

Now the the preflight CORS request goes through using IE10.

Community
  • 1
  • 1
Legends
  • 21,202
  • 16
  • 97
  • 123