Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting these errors when someone attempts to open my app in IE. I get a popup asking to Allow Blocked Content, and when this is clicked everything works fine. Is there anyway I can go about enabling CORS to bypass clicking Allow Blocked Content?

SEC7118: XMLHttpRequest for required Cross Origin Resource Sharing (CORS). 

SEC7120: Origin file: not found in Access-Control-Allow-Origin header. 

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

SEC7118: XMLHttpRequest for required Cross Origin Resource Sharing (CORS). 

Searching the web I found this bit of code, just unaware of where to put it in my script, or if it will even solve my problem.

// Script running on
var xhr = new XMLHttpRequest();
    xhr.onerror = _handleError;
    xhr.onload = _handleLoad;"GET", "", true);
share|improve this question
Can you tell us why you think this is a GIS question? – BradHards Jun 29 '13 at 11:22
Trying to troubleshoot a webapp I made with the ArcGIS JavaScript API. – Maksim Jul 1 '13 at 12:11
I don't think the problem is anything to do with that particular API (and is hence off-topic), but I'm not worried enough to do anything about it. Perhaps you might like to look at… and check this isn't the same issue. – BradHards Jul 2 '13 at 8:09
Does your web server use IIS or Apache? – raykendo Aug 7 '13 at 17:38
@BradHards assuming that CLJ's answer is correct, that would give a reason why this is GIS-specific, ie it depends on a feature of the ArcGIS JS API – Stephen Lead Sep 7 '13 at 22:06

I suspect that the Blocked content is not related to using the esri services. Try creating a simple site that just creates a map with basemap and set = false and then explicitly adding any coors enabled servers into as suggested by CLJ. This will get rid of the error XMLHttpRequest and should hopefully reveal that the issue is related to another aspect of your site

share|improve this answer

You will need to specify your enabled servers:"");"");"");
share|improve this answer

You'll need to configure the webserver to enable Cross Origin Resource Sharing (CORS). Depending on whether you use IIS, Apache, or one of the other ones out there, reconfiguring the app isn't too difficult. Here's a link to how to enable CORS for your application:

share|improve this answer
He can't enable coors as this isn't his server it's ESRI's server. There has been an 'ideas' open for this for a long time, please upvote it – David Wilton Nov 13 '13 at 10:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.