1:后台返回前端长度过大的问题
除了在web.config中设置最大值外还可以修改返回值 [web.config中配置最大值有时候无效,直接修改返回值效果会好一些]
List<User> list=userSer.where(c=>true).ToList(); JavaScriptSerializer serializer = new JavaScriptSerializer(); serializer.MaxJsonLength = Int32.MaxValue; var result = new ContentResult { Content = serializer.Serialize(list), ContentType = "application/json" }; return result;