Tag: javascriptserializer

字符串超过maxJsonLength且小于250kb

我正在使用一个实体和ajax。 我希望在使用JavaScript创建的网格中使用entity framework提供完整的表格。 我目前发送的表格少于140行。 我的代码工作,如果我在表中只有50行,我得到以下错误: {“Message”:”Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.”,”StackTrace”:” at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)\r\n at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat)\r\n at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj)\r\n at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)”,”ExceptionType”:”System.InvalidOperationException”} 在我的网络统计数据中,我的响应正文中的XMLHttpRequest出现500错误,我有错误,如上所示。 […]