We have an app that uses SignalR to talk to scanner drivers locally that has been in production for a couple of years working on IE, Chrome and Firefox, which do not have a problem pulling down the hubs js header file for SignalR. Once Edge came out we saw an issue with talking to localhost and after long efforts of finding a setting to allow it to communicate (and many hours with a Microsoft ticket that they found no solution), we settled on adding headers to allow Edge to grant access to domain:
Access-Control-Allow-Origin: https://localhost:11000
This seemed to work, but little did we notice that it worked for a 64-Bit Windows 10 Edge, but did not on 32-Bit Windows 10 Edge. I have spent hours lowering all security settings for all zones and disabling Protected Mode, trying different ajax tricks to pull the file, but continue to get the error:
SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd.
The following pseudo code fails:
$.ajax({
url: "https://localhost:11000/signalr/hubs",
crossDomain: true,
success: function (data) {
console.log("success");
},
error: function (jqXHR, textStatus, errorThrown) {
console.log("error:");
console.log(jqXHR);
}
});
I'm looking for any insight into settings or anything else to try, or if anyone else has seen this issue. One other piece of information, fiddler doesn't show any traffic for the call so it is being blocked by the browser it would seem. Also on the same computer that fails with Edge - IE, Chrome and FF will succeed.
Your request is missing the following attributes, adding which should solve the problem.
GET
, POST
, etc.application/json
, etc. json
, XML
, etc. Also look at the following code snippet:
type:"POST",
contentType:"application/json; charset=utf-8",
dataType:"json"