aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Ajax Error The Length of the String Exceeds the Value Set on the Maxjsonlength Property in

Sep 1, 2015

Here I will explain how to solve the problem of  
jQuery ajax Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.” in using c#, Actually this jQuery ajax error will occur whenever our result set data cross json default lenth to fix this problem we need to increase maxJsonLength property default value. 

In previous articles I explained gridview examples in, dropdownlist examples in,
jQuery regular expression to validate url without http(s), regular expression to validate phone number in jquery, regular expression to replace all special characters with spaces in c#, regex email validation in c# and many articles relating to jQuery, Now I will explain how to solve the problem of length of the string exceeds the value set on the maxJsonLength property.” in

Generally this problem occur whenever our json result set length exceeds default json MaxJsonLength property value. By default MaxJsonLength property will allow 102400 (100k) in case our string exceeding this length we will get JavaScriptSerializer error.

To solve this problem we need to increase default value of MaxJsonLength for that set MaxJsonLength property value in web.config file like as shown below

<jsonSerialization maxJsonLength="3000000"/>

Once we add above code snippet in web.config file automatically our problem will get solve I hope it helps you…… Happy coding…… 

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Unknown said...


Unknown said...


Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.