1

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

  • IE9
  • JQuery 1.9.1
  • MVC3

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 :(

heymega
  • 8,395
  • 5
  • 38
  • 56
  • You should log posted `data`. Could it contain some control character not getting trimmed by IE ? – jbl Oct 24 '13 at 16:09
  • Also, how long does the request take? Is this calling a long-running process or is it fairly quick? – Cloud SME Oct 24 '13 at 16:14
  • Generally about 0.14seconds. Both the successful and erroring ajax request are identical which is why im so confused – heymega Oct 24 '13 at 16:35

1 Answers1

0

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.

heymega
  • 8,395
  • 5
  • 38
  • 56