mercredi 8 février 2017

what is the maximum size of JsonResult in mvc Controller

I have to work on the MVC with angular based application, I have to retrieve 20000 thousand data from a database to send with Angular.

If I send below of 13000 data return from json, its returning error. else getting this error.

So have used the below solution, it works fine, But why have to use this , what is the limited size of JSON result.

  var jsonResult = Json(x, JsonRequestBehavior.AllowGet);

                    jsonResult.MaxJsonLength = int.MaxValue;
                    return jsonResult;

what is the maximum size of JsonResult it is in data size ?

enter image description here

Aucun commentaire:

Enregistrer un commentaire