I am having problems making an AJAX call when the response is over 2MB. Anything with a response under 2MB works fine. When the response is over 2MB, my "success" method never gets called.
My application is ASP.NET MVC2. I am making the call using the jQuery AJAX call:
$.ajax({
type: "post",
data: ajaxData,
url: ajaxUrl,
success: updateItems,
cache: false
});
In my controller, I am using the Json() action result method:
public ActionResult GetItems(....)
{
...
return Json(packet);
}
When I watch the call in Fiddler it comes back with a HTTP 500 response.
I tried setting the maxJsonLength in the Web.config file as shown here, but that doesn't seem to make any difference.
Any suggestions on how to allow a response over 2MB?
Thanks in advance,
Skip