Json Return Error:The length of the string exceeds the value set on the maxJsonLength property
Error:
var jsonResult = Json(lstModel, JsonRequestBehavior.AllowGet);
o/p:
Internal server Error (or) The length of the string exceeds the value set on the maxJsonLength property
Solved:
var jsonResult = Json(lstModel, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
No comments:
Post a Comment