我可以在web.config中为maxJsonLength设置无限长度吗?

喜你入骨 提交于 2020-08-11 07:53:37

问题:

I am using the autocomplete feature of jQuery. 我正在使用jQuery的自动完成功能。 When I try to retrieve the list of more then 17000 records (each won't have more than 10 char length), it's exceeding the length and throws the error: 当我尝试检索超过17000条记录的列表(每条记录的长度不超过10个字符)时,它超出了长度,并引发错误:

Exception information: 异常信息:
Exception type: InvalidOperationException 异常类型:InvalidOperationException
Exception message: Error during serialization or deserialization using the JSON JavaScriptSerializer. 异常消息:使用JSON JavaScriptSerializer进行序列化或反序列化时出错。 The length of the string exceeds the value set on the maxJsonLength property. 字符串的长度超过了在maxJsonLength属性上设置的值。

Can I set an unlimited length for maxJsonLength in web.config ? 我可以在web.configmaxJsonLength设置无限长度吗? If not, what is the maximum length I can set? 如果没有,我可以设置的最大长度是多少?


解决方案:

参考一: https://stackoom.com/question/4pgR/我可以在web-config中为maxJsonLength设置无限长度吗
参考二: https://oldbug.net/q/4pgR/Can-I-set-an-unlimited-length-for-maxJsonLength-in-web-config
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!