1

Getting Access Denied Error on https in IE. while executing ajax call (to my server1) response which has another ajax call While my Ajax call url is on http .By implementing cors I able to execute on http.Tried JSONP also but then it execute my response till it find another ajax call .How to solve ? below is on myserver1

alert('aaa');
var xhr2 = new XMLHttpRequest();
xhr2.open('GET', 'http://myserver2.com', true);
xhr2.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr2.send();
xhr2.onload = function () {
    alert('fff');
    var appCreds = xhr2.responseText;
    alert(appCreds);
};
alert('xxx');
  • Read this: http://stackoverflow.com/questions/22098259/access-denied-in-ie-10-and-11-when-ajax-target-is-localhost\ – Amy Oct 10 '14 at 07:10

1 Answers1

0

In addition to the trusted site requirement I found that the problem was not fixed until I used the same protocol for the request as my origin, e.g. my test site was hosted on a https but failed with any destination using http (without the s).

This only applies to IE, Chrome just politely logs a warning in the debug console and doesn't fail.

Amy
  • 4,034
  • 1
  • 20
  • 34
  • yes if i add https url to my trusted site zone it works.But that is my limitation I cant add https url to trusted sites .. – user3535720 Oct 10 '14 at 07:17
  • Please refer: http://stackoverflow.com/questions/18706208/xmlhttprequest-access-denied-with-angularjs-on-any-ie-version-below-10 – Amy Oct 10 '14 at 07:19