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 prob
I had the same issue. While Ajax calls to a page on the same domain were working in every other browser, in Edge they wouldn't. Opening the url used for the Ajax call in a different tab would give the correct results. Adding the piece of code to the page serving the Ajax calls fixed it somehow... The code is in C# but maybe this will give a general idea how to fix it in other languages.
if (Request.UserHostName == "127.0.0.1")
Response.AppendHeader("Access-Control-Allow-Origin", "*");
Try it in IE compatibility mode by going into dev tools and selecting from the top drop down, if the error is still occurring with this on, chances are that it's some Windows system files that IE uses. Does this call use authentication with certificates? Maybe the certificate is out of date or Edge uses a different authentication method? Check your sources tab in IE (both compatible and non compatible) to see if the resource is being loaded, as Fiddler only captures HTTP and HTTPS traffic. That should point you in the right direction with regards to errors etc. Finally, maybe just code up a C# app that makes a request to the same URL, it's possible that the new version of .NET uses the same dependencies that could be breaking your call. If so, C# will give you enough of a descriptive error to fix the issue
I had similar problem with Edge. The fix needed changes in ajax call and server running at localhost.
In ajax call I had to change from old text/plain to application/json
contentType: 'application/json; charset=utf-8',
Local server was using Jersey so there I added ContainerResponseFilter implementation that adds Access-Control-Allow-Headers and Access-Control-Allow-Methods headers. Access-Control-Allow-Origin was in place already.
res.getHeaders().add("Access-Control-Allow-Headers", "origin, content-type, accept, authorization");
res.getHeaders().add("Access-Control-Allow-Methods", "POST, GET, OPTIONS");
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"
you can try this.
$.ajax({
url:url,
type:"POST",
data:data,
contentType:"application/json; charset=utf-8",
dataType:"json",
success: function(){
//
}
});
and make sure to properly provide the parameters, content-type, data-type, responseCode..etc