1

JQuery Ajax post request with bulk file failing intermittently and in IE9 its not working at all.

Sometimes Ajax request won't call respective MVC action.

uploaded file size-8MB.

JQuery version-1.8.3.

Error i'm getting is: XMLHttpRequest: Network Error 0x2ee4, Could not complete the operation due to error 00002ee4.

code snippet:

 var form = new FormData($("#EmailForm")[0]);

                    $.ajax({
                        type: "POST",
                        url: rootUrl+"Email/Index",
                        data: form,
                        contentType: false,
                        processData: false,
                        dataType: "json",                        
                        cache: false,
                        timeout: 300000,
                        success: function (data) {
                          
                            if (data.Ok=="0") {

                                $('#lblInfo').css("display", "block");
                                var error = data.Message.split('&&');
                                error.forEach(function (message) {
                                    $('#lblInfo').append('<ul><li>' + message + '</li></ul>');
                                });
                                $(window).scrollTop(0);
                            }
                            else {
                                $('#lblInfo').css("display", "none");
                                var success = data.Message;

                                var url = rootUrl+"Tag/Index?EmailData="+success;
                                window.location.href=url;

                            }
                        },
                        error:function (data)
                        {

                           
                            $('#lblInfo').append('Some Unknown Error Occured!');
                                                

                        }
                    });

any help is appreciated.

Yashas
  • 31
  • 6

2 Answers2

1

Try to add async:false in ajax parameter. sometimes this will be a problem.

Sudhakar P
  • 41
  • 2
0

Seems like an existing IE11 issue:

IE10/IE11 Abort Post Ajax Request After Clearing Cache with error "Network Error 0x2ef3"

CTroller
  • 166
  • 6