您的位置:首页 > Web前端 > JavaScript

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

2020-07-11 11:57 726 查看

精选30+云产品,助力企业轻松上云!>>>

问题:

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐