Json result maxlength
I had to code a page. On this page there will be a button to download
around 12300 registers on a txt file.
I got Json result maxlength error, It happens because 2097152
characters its the default maximun.
In order to set a new max lenght, just add this line on your json result
return object.
return new JsonResult()
{
Data = response,
MaxJsonLength = 86753090,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
};
You can set maxjsonlenght parameter, whatever size you want. But it's
recomendable to use int32.maxvalue as max size permitted.
Comments
Post a Comment