I have some code on the client that calls an ashx handler using $.ajax() and expects json data from the server. Everything works fine on FF, IE 6,7,8 when I run the application on a local webserver. However, when I deploy the application to a remote test server, IEs stopped working ($.ajax returns a parsererror), while FF continues to work as expected.
My first thought was that my json object must have a trialing comma which IEs hate, but that wasn't the issue as there were no trialing commas. Then, I tried changing various things like the content types from app/json to tex/plain, still the same error.
Something that I found odd is that if I fire up fiddler, then IEs will work remotely, otherwise, I get the parsererror.
Has anyone experienced something like this before? Thanks.
$.ajax({
type: "GET",
url: "handlers/GetAsyncResults.ashx",
contentType: "application/json; charset=utf-8",
data: {'from': dateFrom, 'to': dateTo, 'accountId' : aId, 'page': currentPage, 'sortField' : sortField, 'sortDirection' : sortDirection},
dataType: "json",
success: function(data) { GetAsyncResultsEnd(data); },
error: function(x, y, z) { GetAsyncResultsErrorHandler(x, y, z); }
});
EDIT: added code snippet.