I am reactivating this question because I would like to know if there is a way to set the maxJsonLength to indeterminate, since I use the maximum that was suggested in the answer but my data exceeds that size.
"I receive data from an SQL query (more than 14000 records), when using the serializer to convert my data to a table, my web application freezes since the size of the records is very large. I modified in my webconfig the maximum size with the following tag:
<jsonSerialization maxJsonLength="500000"></jsonSerialization>
It already worked, but the problem is that the data increased and the application froze again.
Does anyone know the maximum size for maxJsonLenght
?? or some way to put it indeterminate in case I have more data? Thank you!"
The maximum value you can assign to it is
2,147,483,647
(which is the maximum value of Int32):I still leave another solution that can help you...
After taking the data assigned to a variable
Then we tell that variable to the MaxJsonLength property of type Newtonsoft that it accepts the maximum value that is Int32 as it is in the previous comment.
A complete example...
I hope it works for you... help from JSierra