JsonMaxLength exception on deserializing large json objects

前端 未结 3 2086
栀梦
栀梦 2020-12-23 02:10

Intro:

Web application, ASP.NET MVC 3, a controller action that accepts an instance of POCO model class with (potentially) large field.

Mode

3条回答
  •  心在旅途
    2020-12-23 02:47

    I found that the maxRequestLength did not solve the problem however. I resolved my issue with the below setting. It is cleaner than having to implement a custom ValueProviderFactory

    
      
    
    

    Credit goes to the following questions:

    JsonValueProviderFactory throws "request too large"

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

    This setting obviously relates to a highly complex json model and not the actual size.

提交回复
热议问题