Question

I have a ASP.NET 3.5 App and trying to update a Update Panel which has a nested custom control. In that custom control is a ComponentArt Gird, which gets filled by almost 13MB of Data (Yes, I could chunck that...) at this Update.

I have a hidden button wihtin the update Panel, which I trigger by JS from client side, when I need the updatePanel and the grid.

When I call the Update method during the asyncPostback with Updatepanelxyz.Update() then I get later in the process a asyncPostBackError saying, that the JSonSerializer can't hanlde this amount of data. I should increase the specified value.

Indeed. Understood. But when I change this value in the web.config, then it does only work until round about 8MB, but not more. Is there a limit for the JSonSerializer in that case. I've set the value to the maximum value of Int32, which is kind of the 1000x of the default value, which is already enough for 4MB of serialized data.

Any suggestions? Any way to force the serializer to make that happen? Any way to use another Serializer?

Cheers, Steve

Was it helpful?

Solution

Your best bet is to change the ScriptingJsonSerializationSection.MaxJsonLength Property in your web.config section.

It defaults to 102400 characters, in contrast to the JsonSerializer class' limit of 2097152 characters.

See:

JsonSerializer class maxJsonLength property

and

JsonSerialization configuration section max length property

As I mentioned above, changing the configuration section property is the only way to go unfortunately.

OTHER TIPS

Dude, 1 mb of data is too much - why the heck do you need 13?

I really think you need to refactor your ui. I dont care how fast your network is, that is just crazy stuff!

I agree absolutely the UI and DataAccess layer need a refactor, but for a short-term I was just looking for a simple and quick solution to help my client until the next update of the software comes out.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top