简体   繁体   English

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

[英]Can I set an unlimited length for maxJsonLength in App.config?

I am using the WPF application, Can I set an unlimited length for maxJsonLength in app.config? 我正在使用WPF应用程序,可以在app.config中为maxJsonLength设置无限长度吗? If not, what is the maximum length I can set? 如果没有,我可以设置的最大长度是多少?

The MaxJsonLength cannot be unlimited, is an integer property that defaults to 102400. Set property on your web.config: MaxJsonLength不能为无限,它是一个整数属性,默认为102400。在web.config上设置属性:

<configuration> 
   <system.web.extensions>
       <scripting>
           <webServices>
               <jsonSerialization maxJsonLength="50000000"/>
           </webServices>
       </scripting>
   </system.web.extensions>
</configuration>

It is an integer so the max value you can set is: 2147483644 它是一个整数,因此您可以设置的最大值是: 2147483644

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在App.Config中设置相对路径? - How can I set a relative path in App.Config? 我可以在web.config或app.config中设置条件编译常量吗? - Can I set a conditional compilation constant in a web.config or app.config, if so how? Winforms应用程序的app.config的名称是什么? 以及我怎么知道该应用程序已加载该app.config? - what is the name of the app.config of a winforms app? and how can i know that the app loaded that app.config? 无法使用主机app.config文件设置dll的app.config属性 - Can't set the app.config property of a dll using host app.config file 我可以通过编程方式设置app.config&#39;useLegacyV2RuntimeActivationPolicy&#39;属性吗? - Can I set the app.config 'useLegacyV2RuntimeActivationPolicy' attribute programmatically? 如何在app.config中动态设置WCF服务基地址端口号? - How can I set a WCF service base address port number dynamically in app.config? 在Windows 8上无法访问App.Config的路径。如何更新App.Config? - Access to path denied for App.Config on Windows 8. How can I update App.Config? 我收到“字符串的长度超过 maxJsonLength 属性上设置的值” - I am getting a “The length of the string exceeds the value set on the maxJsonLength property” 无法设置maxJsonLength - Can't set maxJsonLength 我可以在app.config文件中添加条件吗? - Can I add conditions in app.config file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM