While working with JSON in getting records beyond a limit I am getting the following exception:
- InvalidOperationException / Invalid Object.
- Error during serialization or deserialization using the JSON.
To set maximum limit of your JSON response just go to your web.config file and do the following settings:
- <configuration>
- <system.web.extensions>
- <scripting>
- <webServices>
- <jsonSerialization maxJsonLength="50000000"/>
- </webServices>
- </scripting>
- </system.web.extensions>
- </configuration>
Figure 1.