Follow me on Twitter at Twitter.com/wbm
FYI, I'm blogging most of my stuff over at More Wally now.
You might want to add my rss feed to your reader at:http://morewally.com/cs/blogs/wallym/rss.aspx
"Message Length Exceeded" with ASP.NET AJAX - Wallace B. McClure

Wallace B. McClure

All About Wally McClure - The musings of Wallym on Web, HTML5, Mobile, Xamarin.iOS, Xamarin.Android, and Windows Azure.

News

Visual Studio Magazine Column Personal Blog

.NET

Book Authors

Business

Family

Friends

Georgia Tech Bloggers

Personal

Archives

"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 instea od 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 

Posted: Apr 07 2007, 10:35 PM by Wallym | with 1 comment(s)
Filed under: , ,

Comments

Edwin said:

"I am finding that browsers are fickle apps and can be fairly easily overwhelmed by too much data".

I agree on that, for example I've used IE to browse several web site pages which contain a whole bunch of information including several Flash animations, javascript code for user interactions, iframes, etc. I've seen that the browser has a really hard time with too much info in a single page.

# April 10, 2007 9:19 AM