Access denied in IE11 in AngularJS

Each development pipeline consists of two parts. FIRST to work hard and develop the application. SECOND to work harder and make it compatible with great arrogant IE.

We have an AngularJS (v1.3.13) application AngularJS (v1.3.13) without server code developed in Webstorm . We make a REST call for service. Our application works fine on Chrome and Firefox without any console errors. However, when we try to open a page in IE11 or IE9 (not verified IE10), our page does not load. The console assumes 2 errors. One of them is Access is Denied on

 xhr.open(method, url, true); 

in angular.js .

There are a number of messages on the Internet, and none of them work. This is what I tried.

  • Application for hosting in IIS with modified handler mappings to support cross-domain calls in the .Net v4.0 application pool (as suggested by the older ones)
  • Tried to disable HTTP request caching.
  • Adding a domain to the category of trusted sites, as well as adding locahost / IP to the local intranet.
  • Changing the request type to JSONP and trying to add Access-Control-Allow-Origin (with a value of * ) to the headers.
  • Change IE settings for allowed calls through the domain.

A mistake still haunts us. Even my colleagues tried the same thing on their machines, resulting in the same blow. Is there anyone to offer me something about this.

It could be CORS, and I might need to switch to xdr (XDomainRequest), but not sure how to use it, since the error is in angular.js. Of course, I am not an expert in this, so please offer.

Error Screenshot: enter image description here

IE shows another error: [$injector:nomod] Module 'ngLocale' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.2.16/$injector/nomod?p0=ngLocale [$injector:nomod] Module 'ngLocale' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.2.16/$injector/nomod?p0=ngLocale [$injector:nomod] Module 'ngLocale' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.2.16/$injector/nomod?p0=ngLocale , which I now ignore.

Please suggest me something about this. Thanks.

+7
javascript angularjs internet-explorer cors
source share
4 answers

IE11 denied in error AngularJS has a solution on this link I also got the same error while loading image from IE11. I just added to my code and it works.

 window.navigator.msSaveBlob(blob, paramDataObject.fileName); or window.navigator.msSaveOrOpenBlob(blob, paramDataObject.fileName); 
+1
source share

Have you tried xdomain? https://github.com/jpillora/xdomain is a clean alternative to CORS javascript.

0
source share

I switched from 1.3.4 to 1.4.8, and this did the trick. No more Angular Access denied in IE (Microsoft Edge 25 2015). I do not know why.

 <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-route.js/1.4.8/angular.min.js"></script> 
0
source share
 if (window.navigator && window.navigator.msSaveOrOpenBlob) { window.navigator.msSaveOrOpenBlob(blob); } else { var objectUrl = URL.createObjectURL(blob); window.open(objectUrl); } 

Setting window.location or window.open in AngularJS gives "access denied" in IE 11

0
source share

All Articles