ViewState to Session and ControlState compressed

Discussion in 'ASP .Net' started by bill, Dec 7, 2007.

  1. bill

    bill Guest

    Hi folks,
    we have a scenario whereby we're not too worried about cpu cycles on
    the server, and much more worried about users with slow up-stream
    connections to the server. Our goal is to...

    1) Keep ViewState on.
    2) Put ViewState in Session.
    3) Compress the control state that gets sent to browser even when view
    state is in session (since control state is always sent to the
    browser).

    1 & 2 are fine -- we've overridden PageStatePersister and are
    returning SessionPageStatePersister. That was a great savings. But
    we use some 3rd party controls that write quite a lot to control
    state, which of course is being sent down to the VIEWSTATE field. The
    downstream is not such a big deal, but when postbacks occur, of course
    the big VIEWSTATE field is being sent up-stream as well in the forms
    collection.

    So we would love to keep using Session as the main location for view
    state (i.e., keep using SessionPageStatePersister), BUT also compress
    the viewstate/controlstate. Is this possible without writing our own
    Session persister? Is there anywhere we could hook-in to the existing
    SessionPageStatePersister (by inheriting it and using its base
    functionaltiy for example) and compress the stuff before it gets
    psersisted?

    Many thanks,
    Bill
     
    bill, Dec 7, 2007
    #1
    1. Advertising

  2. bill a écrit :
    > Hi folks,
    > we have a scenario whereby we're not too worried about cpu cycles on
    > the server, and much more worried about users with slow up-stream
    > connections to the server. Our goal is to...
    >
    > 1) Keep ViewState on.
    > 2) Put ViewState in Session.
    > 3) Compress the control state that gets sent to browser even when view
    > state is in session (since control state is always sent to the
    > browser).
    >
    > 1 & 2 are fine -- we've overridden PageStatePersister and are
    > returning SessionPageStatePersister. That was a great savings. But
    > we use some 3rd party controls that write quite a lot to control
    > state, which of course is being sent down to the VIEWSTATE field. The
    > downstream is not such a big deal, but when postbacks occur, of course
    > the big VIEWSTATE field is being sent up-stream as well in the forms
    > collection.
    >
    > So we would love to keep using Session as the main location for view
    > state (i.e., keep using SessionPageStatePersister), BUT also compress
    > the viewstate/controlstate. Is this possible without writing our own
    > Session persister? Is there anywhere we could hook-in to the existing
    > SessionPageStatePersister (by inheriting it and using its base
    > functionaltiy for example) and compress the stuff before it gets
    > psersisted?
    >
    > Many thanks,
    > Bill



    Hi Bill,

    I had the same issue recently and found usefull information here :
    http://www.codeproject.com/KB/viewstate/ViewStateCompression.aspx

    This really worked in my case, saving precious bandwith for customers.
    I suppose this would work fine with your method since controlstate is
    stored inside viewstate.

    Hope this helps.

    Vianney
     
    news.microsoft.com, Dec 7, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGF2YW4=?=
    Replies:
    0
    Views:
    484
    =?Utf-8?B?UGF2YW4=?=
    Dec 7, 2005
  2. kelly

    asp.net ControlState

    kelly, Jul 24, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    446
    kelly
    Jul 24, 2006
  3. Mark Olbert
    Replies:
    5
    Views:
    666
    Steven Cheng[MSFT]
    Feb 1, 2007
  4. Edward
    Replies:
    2
    Views:
    618
    Edward
    May 12, 2008
  5. Hans Kesting

    ControlState problems

    Hans Kesting, Jun 5, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    383
    Hans Kesting
    Jun 5, 2008
Loading...

Share This Page