setting jsonSerialization maxJsonLength in ASP.net Web.Config gives 500 error

后端 未结 4 1433
情歌与酒
情歌与酒 2021-01-13 09:19

So, I keep getting the 500 - Internal server error page on my .net site when I set the maxJsonLength in my web.config.

I\'m modifying the .config because even though

4条回答
  •  攒了一身酷
    2021-01-13 09:56

    As none of above worked for me so I used this-

    JsonResult result = Json(, JsonRequestBehavior.AllowGet);
    result.MaxJsonLength = int.MaxValue;
    return result;
    

提交回复
热议问题