且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

获得"的JSON请求是太大而不能反序列化"

更新时间:2022-02-12 08:35:55

您必须调整maxJsonLength属性在的web.config 更高的价值来解决问题。

You have to adjust the maxJsonLength property to a higher value in web.config to resolve the issue.

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

设置更高的值 ASPNET:MaxJsonDeserializerMembers 中的appSettings:

Set a higher value for aspnet:MaxJsonDeserializerMembers in the appSettings:

<appSettings>
  <add key="aspnet:MaxJsonDeserializerMembers" value="150000" />
</appSettings>

如果这些选项都没有工作在这个指定的thread.

If those options are not working you could try creating a custom json value provider factory using JSON.NET as specified in this thread.