Base solution for your next web application
Open Closed

How to configure MaxJsonLength setting in ABP #2250


User avatar
0
feliw created

Hi,

Currently we have a transaction that send over quite big json request around 6mb, so when it try to access the function it would never successfull and when I check the log I found this

ERROR 2017-01-10 12:30:54,622 [49   ] m.Web.Controllers.DataImporterController - Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

I already added below setting to my current web.config but still the same error persists so I think maybe there is another place to set MaxJsonLength for ABP

<system.web.extensions>
    <scripting>
      <webServices>
        <jsonSerialization maxJsonLength="2147483644"/>
      </webServices>
    </scripting>
  </system.web.extensions>

Can you guide me where can I set this setting ? Thanks before :)


2 Answer(s)
  • User Avatar
    0
    feliw created

    Hi All

    After googling awhile I can solved my case already, I check this problem is because of the default JsonValueProviderFactory in .NET. In case you guys encounter the same thing can follow the solution provided in this link

    [http://www.dalsoft.co.uk/blog/index.php/2012/01/10/asp-net-mvc-3-improved-jsonvalueproviderfactory-using-json-net/])

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi feliw,

    Thanks for sharing the solution :).