Avatar ·

Is it possible to set an unlimited length for maxJsonLength in web.config?

Hello colleagues! I encountered a problem when transferring a large JSON object from an ASP.NET MVC controller to the client. I have an action method that returns data via JsonResult: ```csharp public JsonResult GetLargeData() { var data = GetHugeListOfObjects(); // contains about 50000 records return Json(data, JsonRequestBehavior.AllowGet); } ``` On the client side (jQuery) I get an error: "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property." I know that you can increase maxJsonLength in web.config: ```xml