ajaxasp.net-mvcasp.net-mvc-3jqueryasp.net-mvc-ajax

Ajax request randomly aborted in IE


I'm having an intermittent problem with my Ajax call in IE9. Here is my code

 $.ajax({
    url: buildUrl('ActiveTasksTable/' + $('#Id').val()),
    type: "POST",
    cache: false,
    data: data,
    traditional: true,
    success: function (data) {
        $('.expandable-content-loading', section).hide();
        $('.expandable-content', section).html(data);

        initTableActiveTasks(type, section);
    },
    error: function (jqXHR, textStatus, somethingElse) {
        $("body").html(jqXHR.responseText);
    }
});

Heres my setup

Sometimes this ajax request comes back valid and sometimes it errors. I have checked in fiddler and the response is a 504 Gateway Timeout Error and the response text is empty. However when I check this in IE developer tools, the response is Aborted.

Ive tested this in FF and Chrome and they ALWAYS return a valid response. Is this a problem with IE? Is there a workaround for this?

Any help is greatly appreciated. I've been trying to figure this out all week :(


Solution

  • This turned out to be a problem with the load balancer. Occasionally this happened when the packet acknowledgment took longer than 2seconds between servers.

    We installed the application on another server and we no longer experience this problem.