-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internet Explorer 11 causes Access Denied error in OpenLayers.Format.XML #1177
Conversation
Without testing it: it sounds like the browsers same origin policy is violated. Are you trying to do AJAX across domains? Which URL are you requesting, and from which domain is the request issued? |
Please reopen if you are sure you found a bug. |
There are no AJAX calls anywhere unless the WMSGetFeatureInfo control issues them. This error occurs when you are trying to retrieve information with a click or hover on a WMS Layer using WMSGetFeatureInfo. The WMS server (MapServer) is located in the same domain as the openlayers program: http://www.nogcc.ne.gov/MapServer http://www.nogcc.ne.gov/MapServer and http://www.nogcc.ne.gov/olNOGCCOnlineGIS http://www.nogcc.ne.gov/olNOGCCOnlineGIS. Internet Explorer 10, Chrome and Firefox all execute correctly, Internet Explorer 11 does not. In production the error is not visible the WMSGetFeatureInfo functions simple do not execute. When run in debug mode through Visual Studio 12 this is the error returned. Chuck Borcher IT Infrastructure Support Tech. Nebraska Oil and Gas Conservation Commission P.O. Box 399 Sidney, NE 69162 308.254.6919 “If life gives you melons you might be dyslexic!” From: Marc Jansen [mailto:notifications@github.com] Without testing it: it sounds like the browsers same origin policy is violated. Are you trying to do AJAX across domains? Which URL are you requesting, and from which domain is the request issued? — |
@cborcher are you able to test a build without XMLHttpRequest? IE11 really doesn't need this middle man library. See also: https://github.com/ilinsky/xmlhttprequest Easiest way to test is to empty the file lib/OpenLayers/Request/XMLHttpRequest.js and create a new build using build.py |
I can’t run build.py on a windows 8 machine. Please advise on another way to create a build. Chuck Borcher IT Infrastructure Support Tech. Nebraska Oil and Gas Conservation Commission P.O. Box 399 Sidney, NE 69162 308.254.6919 “If life gives you melons you might be dyslexic!” From: Bart van den Eijnden [mailto:notifications@github.com] @cborcher https://github.com/cborcher are you able to test a build without XMLHttpRequest? IE11 really doesn't need this middle man library. See also: https://github.com/ilinsky/xmlhttprequest Easiest way to test is to empty the file lib/OpenLayers/Request/XMLHttpRequest.js and create a new build using build.py — |
@cborcher what version of OpenLayers are you using? Are you using a hosted build? What's the error on Windows 8 with build.py? I can probably send you a custom build, bartvde [at] boundlessgeo [dot] com |
The OpenLayers version is 2.12. Right now I am unable to test anything. Windows 8.1 crashed completely yesterday and required a reinstall. Will be at least another couple of days to get all the programs reinstalled. From: Bart van den Eijnden [mailto:notifications@github.com] @cborcher https://github.com/cborcher what version of OpenLayers are you using? Are you using a hosted build? What's the error on Windows 8 with build.py? I can probably send you a custom build, bartvde [at] boundlessgeo [dot] com — |
Does the attached pull request fix the issue? |
I think I experience the same problem of issue openlayers#1177 As an example I modified the GetFeatureInfo example injecting the corrupt data that cause the error in IE11. Just click in the map. Obviously the not valid HTML5 is can't be read with DomParser() in IE11. One solution is pull request openlayers#1285 Another solution may be to check the INFO_FORMAT and do not call var features = this.format.read(doc); if it is text/html or text/plain (i.e. not a GML) as in showInfo() just the text is used (no GML features): document.getElementById('responseText').innerHTML = evt.text;
I think I experience the same problem. As an example I modified the GetFeatureInfo example injecting the corrupt data that cause the error in IE11. Just click in the map. See pull request #1286 Obviously the not valid HTML5 is can't be read with DomParser() in IE11. |
Fixed with #1439. |
I think I experience the same problem of issue openlayers#1177 As an example I modified the GetFeatureInfo example injecting the corrupt data that cause the error in IE11. Just click in the map. Obviously the not valid HTML5 is can't be read with DomParser() in IE11. One solution is pull request openlayers#1285 Another solution may be to check the INFO_FORMAT and do not call var features = this.format.read(doc); if it is text/html or text/plain (i.e. not a GML) as in showInfo() just the text is used (no GML features): document.getElementById('responseText').innerHTML = evt.text;
Internet Explorer 11 causes a 0x80070005 - JavaScript runtime error: Access is denied.
in the OpenLayers.Format.XML class when the browser tries to open an XMLHttpRequest at the req.open(... statement.
...
function() {
var req = new XMLHttpRequest();
req.open("GET", "data:" + "text/xml" +
";charset=utf-8," + encodeURIComponent(text), false);