The JSON request was too large to be deserialized

T

The JSON request was too large to be deserialized is a very common error because of MVC’s default size for a JSON response from the Web Api. Luckily there is a very simple solution that requires a minor change in your Web.config

Increasing JSON request with aspnet:MaxJsonDeserializerMembers

Inside of your Web.config under the AppSettings section you need to set a value in a key called aspnet:MaxJsonDeserializerMembers. This will tell the default deserialize process in a Web API call to allow much longer data results.

[code]



[/code]

The value of 150000 can be set to valid Integer value that could probably use a little bit of trial and error to find the right value.

About the author

By Jamie

My Books