We can set the maximum json length in web.config in two ways:
1: in bytes
<configuration>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="500000">
</jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
</configuration>
2: in the application settings. Maximum entries in json object (this case is 150,000)
<add key="aspnet:MaxJsonDeserializerMembers" value="150000" />
I am wondering when to use which one? Do I always need both? Do these two people work with each other somehow?
source
share