Ajax not working in IE11 error code 0x2f78

Here is my ajax installation:

$.support.cors = true; $.ajax({ beforeSend: function () { }, type: "POST", url: "test.cgx", data: hex_str, dataType: "xml", processData: false, contentType: "text/xml; charset=utf-8", success: function (msg) { }, error: function (msg) { } }); 

If the data - hexstr less than 4 characters (for example, hex_str = "3A"), I received the following error (after 1 minute of waiting for the request):

XMLHttpRequest: network error 0x2f78, operation failed due to error 00002f78.

This only happens in IE, FF, and Chrome can send any data. The data that I send is not in XML format, it is only Hex data (I need contentType: "text/xml; charset=utf-8" for some other reason).

I am using jQuery 1.8.2

+5
source share
3 answers

I had the same problem, just put this line in your header, I hope it works for you

  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" > 
+1
source

Please check the URL and the query string. It can be a very long time.

0
source

When I ran into this error, it was because I had a header pointing to a missing css file. I fixed the link and the error went away.

I suspect this has something to do with microsoft because it only appears on Edge. Since he reported a missing link from the XMLHttpRequest method, it looked like a network link to a method, and it spits out this network error even if it lacks a local file.

Hope this helps. Errors that appear, but do not seem harmful, can sometimes be unpleasant. Good luck.

... ken

0
source

Source: https://habr.com/ru/post/1206781/


All Articles