Response from the server is too big

Last post 05-14-2008 3:50 PM by soccerdad. 3 replies.

Sort Posts:

  • Response from the server is too big

    05-14-2008, 11:49 AM
    • Loading...
    • gibble
    • Joined on 05-15-2007, 4:40 PM
    • Posts 34

    I am trying to find a way to handle webservice responses that are too large... currently it errors.  Is there a way to stream the response back in chunks?

     

    Somehow the updatepanel seems to manage, but using the script manager with a webservice fails if the response is too big. 

  • Re: Response from the server is too big

    05-14-2008, 3:18 PM
    Answer
    • Loading...
    • soccerdad
    • Joined on 12-12-2005, 2:05 PM
    • Posts 69

    If the response is json-serialized, you can set the maxJsonLength attribute in Web.config. It's likely already in there in a commented out element. Change it to something like:

    <jsonSerialization maxJsonLength="500000">

    (It's in the system.web.extensions section.)

    We just had to tweak this yesterday for some oversized web service results.

    Donnie


     

  • Re: Response from the server is too big

    05-14-2008, 3:45 PM
    • Loading...
    • gibble
    • Joined on 05-15-2007, 4:40 PM
    • Posts 34

    I've set it to a higher number, which helps, but at times, the response is so large that the browser prompts that the script is taking too long, and lets you stop it!  Ideally I would like to be able to retrieve data in blocks, so the browser doesn't just hang on a large result...     

  • Re: Response from the server is too big

    05-14-2008, 3:50 PM
    • Loading...
    • soccerdad
    • Joined on 12-12-2005, 2:05 PM
    • Posts 69

    Sounds like you might need to implement some kind of paging return mechanism in your web service; e.g. "return page 3 for a page size of 100".

     

Page 1 of 1 (4 items)