Follow @endyourif rss Facebook LinkedIn

The JSON request was too large to be deserialized The JSON request was too large to be deserialized

Published on Jan 29, 2020

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.



  



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.

Tags: ASP.NET | json

My Books
ASP.NET MVC 5 With Bootstrap and Knockout.js
Knockout.js Building Dynamic Client-Side Applications
20 Recipes for Programming MVC 3
20 Recipes for Programming PhoneGap
Rapid Application Development with CakePHP