1

We have the following issue with our AngularJS application. We send a request via tha Angular $http Service like this:

var req = {
                method: 'POST',
                url: apiUrl + 'reg',
                headers: {
                    'Content-Type': 'application/json; charset=utf-8',
                    'ApiToken': apiToken
                },
                data: {
                    'regCode': regCode
                },
                responseType: 'json'
            };
return $http(req);

The API is an HTTPS Url. The page which sends the request with the code above is also served by HTTPS.

The request works fine in Chrome or Firefox but most of the time the request fails in IE11 (11.0.9600.18059 Update 11.0.24) with the following message:

SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3

The Network tab in IE shows the request has taken < 1ms and the Result says (Aborted) which means the request never has started from IE side.

The fun part is that if I am doing the request without AngularJS like this:

var req = new XMLHttpRequest();
req.open('POST', url);
req.setRequestHeader('ApiToken', apiToken);
req.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
req.send(json);

everything works fine in IE. Also it seems the requests via GET works fine too.

Any idea what could be wrong or what I can try ?

  • I would check these answers http://stackoverflow.com/questions/14527387/script7002-xmlhttprequest-network-error-0x2ef3-could-not-complete-the-operati and if it does not help, I would compare the HTTP requests sent by Angular (that does not work) and yours (that works) above (i.e. headers, urls, parameters, ...). If nothing helps then I would go to debug AngularJs: https://github.com/angular/angular.js/blob/master/src/ng/http.js#L1163 (it's open source, so you can see, what it does if you use un-minified version). – MartyIX Nov 13 '15 at 12:36
  • It seems that the issue is on server side as I tested it now on IE11 Win10 (before it was IE11 Win7) and I can see the request was sent but no response returned. – WorldSignia Nov 13 '15 at 16:15

0 Answers0