jeudi 7 avril 2016

MVC MaxJsonLength error returning a view

i'm getting an error when I return a View in MVC. this error is Error during serialization or deserialization using the JSON JavaScriptSerializer. I already set the MaxJsonLength property in my webconfig and the error is still there.

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

I see a lot of answers in another questions, but the solution i saw is that you can return a JsonResult and at this point change the MaxJsonLength in the variable. but the problem is that im returning a View, and i can't find an answer to this.

I'm using MVC3 with framework 4.5.2. the controller consults the data from another project in solution where i have my business logic, its just a library project.

Aucun commentaire:

Enregistrer un commentaire