How to resolve "The JSON request was too large to be deserialized" error

This exception arises when the length of the JSON data that is being sent to the method on the controller increases beyond 1000 i.e the default max length of that can be serialized by the JavaScriptSerializer.

All we need to do is to add the following snippet of code to the web.config file inside the "appSettings" tag.

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