Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Javascript CORS Request Failing After Latest Windows Update

$
0
0

I have been developing a web application using Visual Studio 2010 on Windows 7 Enterprise 64-bit for the last 8 months or so with no problems.  I am running in debug mode to check my code, so my origin for the web page is on my localhost at port 64388. Javascript code in the page is issuing ajax requests using the AngularJS $http service to our API server located on another domain and getting back JSON data.  

This has been working beautifully until I installed the latest Windows updates last night (Apirl 2014), and now the requests are no longer succeeding when sent from IE 11.

Using Fiddler, I can see the pre-flight request being issued for the resources:

OPTIONS https://myapiserver.com/1/api/yadayadayada/Terms?IsCurrent=Any HTTP/1.1
Accept: */*
Origin: http://localhost:64388
Access-Control-Request-Method: GET
Access-Control-Request-Headers: authorization, accept
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: myapiserver.com
Content-Length: 0
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache

And I am getting a successful pre-flight response from the server:

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache
Pragma: no-cache
Content-Length: 0
Server: Microsoft-IIS/7.5
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
Access-Control-Allow-Headers: authorization, accept
X-Powered-By: ARR/2.5
X-Powered-By: ASP.NET
Date: Thu, 24 Apr 2014 17:07:31 GMT



Normally, I would then see the GET request being issued and the data being returned.  However, the subsequent GET request is never issued, and I see the following sequence of messages in the javascript console:

XMLHttpRequest for https://myapiserver.com/yadayadayada/Terms?IsCurrent=Any required Cross Origin Resource Sharing (CORS).

XMLHttpRequest for https://myapiserver.com/yadayadayada/Terms?IsCurrent=Any required CORS preflight.

XMLHttpRequest: Network Error 0x80070005, Access is denied.

I would welcome any suggestions as to what is going on that caused these requests to now fail.  I am currently unable to use IE 11 to view my web application in development.  Google Chrome and Firefox are both issuing requests and receiving responses normally, so I am forced to use them for development now.

Pre-flight from Chrome:

OPTIONS https://myapiserver.com/yadayadayada/Terms?IsCurrent=Any HTTP/1.1
Host: myapiserver.com
Connection: keep-alive
Access-Control-Request-Method: GET
Origin: http://localhost:64388
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36
Access-Control-Request-Headers: accept, authorization
Accept: */*
DNT: 1
Referer: http://localhost:64388/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8


Response to Chrome:

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache
Pragma: no-cache
Content-Length: 0
Server: Microsoft-IIS/7.5
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
Access-Control-Allow-Headers: accept, authorization
X-Powered-By: ARR/2.5
X-Powered-By: ASP.NET
Date: Thu, 24 Apr 2014 17:16:59 GMT

The actual resource request and response then follows.

Thanks for any help. 

Rich


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>