asp.net - JavaScriptSerializer.MaxJsonLength exceeded. What's the best practice for handling this? -


I have a huge amount of data that I'm sending to clients using the $ .jax () function of jQuery. I am calling a method in the ASP.NET Web Service which returns JSON data. Everything is great for most searches, but when I have a large data set I go into a problem with the JavaScriptSerializer MaxJsonLength property. What is the best practice to deal with this? I just do not want to set a maximum length arbitrarily, can I set up Maxson Lamben in the web service if the return data is bigger than the current maximum or will I write and send the client in exchange for the data?

Here is the relevant snippet from the web Service:

Dictionary

The only way to set maximum length for web methods to call from client scripts Way Web What is your problem with setting up the config file (below)? I will do this on several exhaust calls to stream some of the data.

  & lt; System.web.extensions & gt; & Lt; Screening & gt; & Lt; Webservices & gt; & Lt; JsonSerialization maxJsonLength = "500000" & gt; & Lt; / JsonSerialization & gt; & Lt; / Webservices & gt; & Lt; / Script & gt; & Lt; /system.web.extensions>  

Update: The default size is 20 9 7152, which is equivalent to 4 MB Unicode string data. Are you really sending that data back to the customer? If Ouch and you need to see app design then the user experience will be slow and cumbersome.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -