Corrupted ViewState (Yes, another issue concerning viewstate)

Discussion in 'ASP .Net' started by Ben Rush, Dec 4, 2003.

  1. Ben Rush

    Ben Rush Guest

    Hello World,

    Okay, I have spent the day browsing the newsgroups and reading up on
    article after article concerning ViewState corruption and so forth, and I
    have a couple questions. We intermittantly get the following exception -

    EXCEPTION MESSAGE:
    The viewstate is invalid for this page and might be corrupted.

    STACK TRACE:
    at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
    at System.Web.UI.Page.LoadPageViewState()
    at System.Web.UI.Page.ProcessRequestMain()

    Perhaps once or twice a day, it changes. We're NOT using a server farm,
    and I have ran through the following articles, and have tried to use their
    recommendations for reproducing this behavior to no avail on our machines -

    http://support.microsoft.com/default.aspx?scid=kb;en-us;812399 (Not a
    problem, cannot reproduce)
    http://support.microsoft.com/default.aspx?scid=kb;en-us;323744 (Not a
    problem, cannot reproduce)
    http://support.microsoft.com/default.aspx?scid=kb;en-us;316920 (Not a
    problem, cannot reproduce)
    http://support.microsoft.com/default.aspx?scid=kb;en-us;324488 (Not a
    problem, cannot reproduce)

    The pages we seem to be getting these exceptions on have relatively
    large viewstates in them, but nothing monster (with the exception of one
    page which has a 125,888 bytes of ViewState). We *are* currently in the
    process of shaving down the ViewState by determining which controls need to
    use it and not - so size won't be nearly this issue it is now in the future.

    I have encountered one thread, however at
    http://groups.google.com/groups?hl=...lr=&ie=UTF-8&oe=UTF-8&scoring=d&start=10&sa=N
    that peaked my interest. It's possible that the users may be timing out, and
    if the validation key is autogenerated, and changes itself if the session
    times out, then we could be seeing this as a potential issue.

    My question is this,

    1) Has anyone had any experience with this exception, and are there
    possibilities for other issues outside of the support KDB articles I have
    included in this mail,
    2) How can I determine what the validationKey was at the time of an
    exception? Is there a way I can grab this? I'm assuming not, or at least not
    easily,
    3) Does the validationKey timeout? And if so, how can I force it to
    timeout so that I can see this issue / reproduce this issue.
    4) Any other thoughts?

    I understand that this issue has been beat down pretty good, but nothing
    I have found so far seems to kick up any possible leads into the issue
    causing this.

    We're running the 1.1 framework on Server 2003.

    Thanks in advance,
    Ben
    Ben Rush, Dec 4, 2003
    #1
    1. Advertising

  2. Ben Rush

    bruce barker Guest

    you should supply the key (same as a server farm) so that its stable between
    reboots.
    you should turn off EnableViewStateMac because it fails a lot.

    if you done both of these the other possibility is that the user is going
    thru a proxy server that truncates the viewstate. some proxy servers will
    truncate a hidden field to 2k. while large viewstates are ok for entranets,
    extra or internets should keep the viewstate below 1k.


    -- bruce (sqlwork.com)



    "Ben Rush" <> wrote in message
    news:eTs$...
    > Hello World,
    >
    > Okay, I have spent the day browsing the newsgroups and reading up on
    > article after article concerning ViewState corruption and so forth, and I
    > have a couple questions. We intermittantly get the following exception -
    >
    > EXCEPTION MESSAGE:
    > The viewstate is invalid for this page and might be corrupted.
    >
    > STACK TRACE:
    > at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
    > at System.Web.UI.Page.LoadPageViewState()
    > at System.Web.UI.Page.ProcessRequestMain()
    >
    > Perhaps once or twice a day, it changes. We're NOT using a server

    farm,
    > and I have ran through the following articles, and have tried to use their
    > recommendations for reproducing this behavior to no avail on our

    machines -
    >
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;812399 (Not a
    > problem, cannot reproduce)
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;323744 (Not a
    > problem, cannot reproduce)
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;316920 (Not a
    > problem, cannot reproduce)
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;324488 (Not a
    > problem, cannot reproduce)
    >
    > The pages we seem to be getting these exceptions on have relatively
    > large viewstates in them, but nothing monster (with the exception of one
    > page which has a 125,888 bytes of ViewState). We *are* currently in the
    > process of shaving down the ViewState by determining which controls need

    to
    > use it and not - so size won't be nearly this issue it is now in the

    future.
    >
    > I have encountered one thread, however at
    >

    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=uVR#vR
    cjDHA.1740%40TK2MSFTNGP12.phx.gbl&rnum=15&prev=/groups%3Fq%3DThe%2BView%2BSt
    ate%2Bis%2Binvalid%2Bfor%2Bthis%2Bpage%2Band%2Bmight%2Bbe%2Bcorrupted%26hl%3
    Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26scoring%3Dd%26start%3D10%26sa%3DN
    > that peaked my interest. It's possible that the users may be timing out,

    and
    > if the validation key is autogenerated, and changes itself if the session
    > times out, then we could be seeing this as a potential issue.
    >
    > My question is this,
    >
    > 1) Has anyone had any experience with this exception, and are there
    > possibilities for other issues outside of the support KDB articles I have
    > included in this mail,
    > 2) How can I determine what the validationKey was at the time of an
    > exception? Is there a way I can grab this? I'm assuming not, or at least

    not
    > easily,
    > 3) Does the validationKey timeout? And if so, how can I force it to
    > timeout so that I can see this issue / reproduce this issue.
    > 4) Any other thoughts?
    >
    > I understand that this issue has been beat down pretty good, but

    nothing
    > I have found so far seems to kick up any possible leads into the issue
    > causing this.
    >
    > We're running the 1.1 framework on Server 2003.
    >
    > Thanks in advance,
    > Ben
    >
    >
    >
    >
    >
    bruce barker, Dec 4, 2003
    #2
    1. Advertising

  3. Ben Rush

    Ben Rush Guest

    Bruce,

    I can understand the first thing you said, that is

    "you should supply the key (same as a server farm) so that its stable
    between reboots."

    and I will make that as a recommendation. However, I would like to have a
    bit more information concerning the issues being had by EnableViewStateMac,
    preferrably a Microsoft KDB article, or a bit more *substance*. I'm not sure
    if I like the idea of turning of the hashing of the ViewState. In other
    words, when you say

    "you should turn off EnableViewStateMac because it fails a lot."

    Why is it failing? Or is just a unknown failure that Microsoft hasn't
    recognized, etc.

    Thanks,
    Ben


    "bruce barker" <> wrote in message
    news:...
    > you should supply the key (same as a server farm) so that its stable

    between
    > reboots.
    > you should turn off EnableViewStateMac because it fails a lot.
    >
    > if you done both of these the other possibility is that the user is going
    > thru a proxy server that truncates the viewstate. some proxy servers will
    > truncate a hidden field to 2k. while large viewstates are ok for

    entranets,
    > extra or internets should keep the viewstate below 1k.
    >
    >
    > -- bruce (sqlwork.com)
    >
    >
    >
    > "Ben Rush" <> wrote in message
    > news:eTs$...
    > > Hello World,
    > >
    > > Okay, I have spent the day browsing the newsgroups and reading up on
    > > article after article concerning ViewState corruption and so forth, and

    I
    > > have a couple questions. We intermittantly get the following exception -
    > >
    > > EXCEPTION MESSAGE:
    > > The viewstate is invalid for this page and might be corrupted.
    > >
    > > STACK TRACE:
    > > at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
    > > at System.Web.UI.Page.LoadPageViewState()
    > > at System.Web.UI.Page.ProcessRequestMain()
    > >
    > > Perhaps once or twice a day, it changes. We're NOT using a server

    > farm,
    > > and I have ran through the following articles, and have tried to use

    their
    > > recommendations for reproducing this behavior to no avail on our

    > machines -
    > >
    > > http://support.microsoft.com/default.aspx?scid=kb;en-us;812399 (Not a
    > > problem, cannot reproduce)
    > > http://support.microsoft.com/default.aspx?scid=kb;en-us;323744 (Not a
    > > problem, cannot reproduce)
    > > http://support.microsoft.com/default.aspx?scid=kb;en-us;316920 (Not a
    > > problem, cannot reproduce)
    > > http://support.microsoft.com/default.aspx?scid=kb;en-us;324488 (Not a
    > > problem, cannot reproduce)
    > >
    > > The pages we seem to be getting these exceptions on have relatively
    > > large viewstates in them, but nothing monster (with the exception of one
    > > page which has a 125,888 bytes of ViewState). We *are* currently in the
    > > process of shaving down the ViewState by determining which controls need

    > to
    > > use it and not - so size won't be nearly this issue it is now in the

    > future.
    > >
    > > I have encountered one thread, however at
    > >

    >

    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=uVR#vR
    >

    cjDHA.1740%40TK2MSFTNGP12.phx.gbl&rnum=15&prev=/groups%3Fq%3DThe%2BView%2BSt
    >

    ate%2Bis%2Binvalid%2Bfor%2Bthis%2Bpage%2Band%2Bmight%2Bbe%2Bcorrupted%26hl%3
    > Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26scoring%3Dd%26start%3D10%26sa%3DN
    > > that peaked my interest. It's possible that the users may be timing out,

    > and
    > > if the validation key is autogenerated, and changes itself if the

    session
    > > times out, then we could be seeing this as a potential issue.
    > >
    > > My question is this,
    > >
    > > 1) Has anyone had any experience with this exception, and are there
    > > possibilities for other issues outside of the support KDB articles I

    have
    > > included in this mail,
    > > 2) How can I determine what the validationKey was at the time of an
    > > exception? Is there a way I can grab this? I'm assuming not, or at least

    > not
    > > easily,
    > > 3) Does the validationKey timeout? And if so, how can I force it to
    > > timeout so that I can see this issue / reproduce this issue.
    > > 4) Any other thoughts?
    > >
    > > I understand that this issue has been beat down pretty good, but

    > nothing
    > > I have found so far seems to kick up any possible leads into the issue
    > > causing this.
    > >
    > > We're running the 1.1 framework on Server 2003.
    > >
    > > Thanks in advance,
    > > Ben
    > >
    > >
    > >
    > >
    > >

    >
    >
    Ben Rush, Dec 5, 2003
    #3
    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. Gordon Moore
    Replies:
    0
    Views:
    432
    Gordon Moore
    Jun 27, 2003
  2. Hardy Wang
    Replies:
    5
    Views:
    343
    Hardy Wang
    Jul 4, 2003
  3. Trevor Andrew
    Replies:
    0
    Views:
    458
    Trevor Andrew
    Jul 25, 2003
  4. teo
    Replies:
    3
    Views:
    513
  5. Jamie Herre
    Replies:
    1
    Views:
    175
    why the lucky stiff
    Jan 7, 2005
Loading...

Share This Page