Reputation: 2944
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
In jQuery grid on button click I am displaying something like 28000 rows. I know some of them are suggested to define the JsonmaxLength in web config file, but it's not working for me.
Upvotes: 0
Views: 824
Reputation: 2096
Can you show us the entry in your web config?
Have you tried something like this?
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="500000">
</jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
more info here
Upvotes: 1
Reputation: 415735
i am displaying something like 28000 rows?
That sounds like a user interface nightmare to me. About the most rows you should ever think about presenting directly to a user at one time is 500. Anything beyond that and at best you're giving someone a false sense that they've seen a representative sample of your data.
Even paging is not a solution here unless you have a good sort. You should really have a search interface, aggregate it into a smaller set (think charts or graphs), or make it available for download in a format the user can open in a tool to help do real analysis on it (csv, excel, etc).
Upvotes: 1