"Message Length Exceeded" with ASP.NET AJAX - More Wally - Wallace B. McClure
in

MoreWally.com

Giving people what they want, More Wally. This is the technical and personal blog site of
Wallace B. (Wally) McClure.

This Blog

Syndication

Technical Sites

Archives

More Wally - Wallace B. McClure

This blog will have all kinds of posts about Wally McClure. In it, there will be tons of .NET and computer programming posts as well as Wally's views on life in general. As you might guess, this site and blog help you get More Wally in your life. What more could anyone want? iPhone, Android, Xamarin.iOS, Xamarin.Android, Mobile, HTML5, .NET, ADO.NET, ASP.NET, AJAX, jQuery, jQuery Mobile, ASP.NET AJAX, and Windows Azure............follow me on twitter at Wally

"Message Length Exceeded" with ASP.NET AJAX

Have you gotten a client side message along the lines of "Message Length Exceeded" when working with an ASP.NET AJAX application?  If so, check into the web.config tag:

<jsonSerialization maxJsonLength="........"> 

Depending on the payload that you are  trying to send to the client, you may need touncomment this line and put a large enough value in for the maxJsonLength attribute.  I would suggest caution in doing this.  By setting this value to a really high number, you can solve the problem, but you can cause problems on the client if the payload is too large instead of just generating the error.  As we do more development, I am finding that browsers are fickle apps and can be fairly easily overwhelmed by too much data.  I am sure that no one is surprised by that.

For more information on maxJsonLegnth, check out:

http://ajax.asp.net/docs/mref/P_System_Web_Configuration_ScriptingJsonSerializationSection_MaxJsonLength.aspx 

http://ajax.asp.net/docs/mref/P_System_Web_Script_Serialization_JavaScriptSerializer_MaxJsonLength.aspx

Comments

No Comments
2006 - Wallace B. McClure
Powered by Community Server (Non-Commercial Edition), by Telligent Systems