This is a migrated thread and some comments may be shown as answers.

Json error on GridModel

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
scorp
Top achievements
Rank 1
scorp asked on 26 Jan 2012, 04:31 PM
I am getting the following exception on an action decorated with [GridAction] attribute and returning a GridModel. This was working fine till last week however has been throwing this error recently. The data is being returned correctly from the database and has about 5000 records. There are other pages which have higher number of records being returned without an issue.

System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. 
 

1 Answer, 1 is accepted

Sort by
0
scorp
Top achievements
Rank 1
answered on 26 Jan 2012, 04:50 PM
The issue was I had accidentally removed paging on the page. Once I turned the paging on the page works fine now.
Tags
Grid
Asked by
scorp
Top achievements
Rank 1
Answers by
scorp
Top achievements
Rank 1
Share this question
or