Works in Windows 10, Microsoft Edge. I have an application installed locally on my computer in IIS (10.119.103.10), which is trying to execute requests to another computer on the network (10.119.103.2) that is configured to use CORS.
It all works in chrome and internet explorer ... here is a test case
function LOG(message) { var el = document.createElement('pre'); el.textContent = message; output.appendChild(el); } function xhrtest(url) { var XHR = new XMLHttpRequest(); LOG("OPEN " + url); XHR.open("GET", url, true); XHR.onreadystatechange = function(e) { LOG('READY ' + XHR.readyState + ' STATUS ' + XHR.status + ' ' + XHR.statusText + ' TYPE ' + XHR.responseType); LOG(XHR.response); } LOG("SEND"); XHR.send(); }
<button onclick="xhrtest('http://10.119.103.2/~adf/RMC2/trunk/server/?r=get')">XHR TEST</button> <hr/> <div id="output"></div>
However, the following error appears in Microsoft Edge:
SCRIPT7002: XMLHttpRequest: network error 0x2efd, operation could not be completed due to error 00002efd.
The client (XMLHttpRequest) does not even try to connect to the server, it is immediately released. Test scenario producing this conclusion: -
OPEN http://10.119.103.2/~adf/RMC2/trunk/server/?r=get SEND READY 4 STATUS 0 TYPE
I suspect that this has something to do with private networks, although in fact I have no idea and donβt know how to resolve it.
Austin france
source share