Professional Web Applications Themes

The viewstate is invalid for this page and might be corrupted problem - ASP.NET General

Hi all: I developed a web site, it passed various testing internally. When I put this site in production, I receive some error reports from this site saying "the viewstate is invalid for this page and might be corrupted". I am wandering what kind of client side problem may cause this error? Is it possible that user uses a browser which has local cache turned on all the time? Thanks for any suggestion. -- WWW: [url]http://hardywang.1accesshost.com[/url] ICQ: 3359839 yours Hardy...

  1. #1

    Default The viewstate is invalid for this page and might be corrupted problem

    Hi all:
    I developed a web site, it passed various testing internally. When I put
    this site in production, I receive some error reports from this site saying
    "the viewstate is invalid for this page and might be corrupted". I am
    wandering what kind of client side problem may cause this error? Is it
    possible that user uses a browser which has local cache turned on all the
    time?

    Thanks for any suggestion.

    --
    WWW: [url]http://hardywang.1accesshost.com[/url]
    ICQ: 3359839
    yours Hardy


    Hardy Wang Guest

  2. #2

    Default Re: The viewstate is invalid for this page and might be corrupted problem

    Viewstate is the values, et al, of page controls, stored in a hidden field,
    that is sent back to the server. It is unlikely a client error. More likely
    is a machine setting, not having viewState enabled in your app/page, or a
    combination of both. If you are passing from page to page with viewState,
    you increase the chance of problems.

    Look at enableViewStat and enableViewStateMac. Depending on server set up,
    you will set one or both. Play around a bit, as I do not have the info in
    front of me. Dinking with enableViewStateMac saved one of our apps. I
    mention both, as I do not want to send you down a road and not give other
    options.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    Author: ADO.NET and XML: ASP.NET on the Edge

    ************************************************** **************************
    ****
    Think Outside the Box!
    ************************************************** **************************
    ****
    "Hardy Wang" <hardy_wangmarketrend.com> wrote in message
    news:uNKk2qZQDHA.2636TK2MSFTNGP10.phx.gbl...
    > Hi all:
    > I developed a web site, it passed various testing internally. When I
    put
    > this site in production, I receive some error reports from this site
    saying
    > "the viewstate is invalid for this page and might be corrupted". I am
    > wandering what kind of client side problem may cause this error? Is it
    > possible that user uses a browser which has local cache turned on all the
    > time?
    >
    > Thanks for any suggestion.
    >
    > --
    > WWW: [url]http://hardywang.1accesshost.com[/url]
    > ICQ: 3359839
    > yours Hardy
    >
    >

    Cowboy \(Gregory A. Beamer\) Guest

  3. #3

    Default Re: The viewstate is invalid for this page and might be corrupted problem

    I am pretty sure, I have enabled viewstate in my application and all web
    pages. I don't use viewstate to pass information to other pages, just self
    post-back.

    From my machine, I even cannot reproduce this error in both development and
    production machines. I tested from internal LAN and external dial-up
    network, application works fine in all situation.

    So I just cannot understand well why this will happen.

    --
    WWW: [url]http://hardywang.1accesshost.com[/url]
    ICQ: 3359839
    yours Hardy


    "Cowboy (Gregory A. Beamer)" <NoSpamMgbworldcomcast.netRemuvThis> wrote in
    message news:%23Hq73xZQDHA.3192tk2msftngp13.phx.gbl...
    > Viewstate is the values, et al, of page controls, stored in a hidden
    field,
    > that is sent back to the server. It is unlikely a client error. More
    likely
    > is a machine setting, not having viewState enabled in your app/page, or a
    > combination of both. If you are passing from page to page with viewState,
    > you increase the chance of problems.
    >
    > Look at enableViewStat and enableViewStateMac. Depending on server set up,
    > you will set one or both. Play around a bit, as I do not have the info in
    > front of me. Dinking with enableViewStateMac saved one of our apps. I
    > mention both, as I do not want to send you down a road and not give other
    > options.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    > Author: ADO.NET and XML: ASP.NET on the Edge
    >
    >
    ************************************************** **************************
    > ****
    > Think Outside the Box!
    >
    ************************************************** **************************
    > ****
    > "Hardy Wang" <hardy_wangmarketrend.com> wrote in message
    > news:uNKk2qZQDHA.2636TK2MSFTNGP10.phx.gbl...
    > > Hi all:
    > > I developed a web site, it passed various testing internally. When I
    > put
    > > this site in production, I receive some error reports from this site
    > saying
    > > "the viewstate is invalid for this page and might be corrupted". I am
    > > wandering what kind of client side problem may cause this error? Is it
    > > possible that user uses a browser which has local cache turned on all
    the
    > > time?
    > >
    > > Thanks for any suggestion.
    > >
    > > --
    > > WWW: [url]http://hardywang.1accesshost.com[/url]
    > > ICQ: 3359839
    > > yours Hardy
    > >
    > >
    >
    >

    Hardy Wang Guest

  4. #4

    Default Re: The viewstate is invalid for this page and might be corrupted problem

    Hi:
    What I have in this page is some standard controls, with a ASCX file,
    which includes some other standard controls. I think they should be a
    problem.

    --
    WWW: [url]http://hardywang.1accesshost.com[/url]
    ICQ: 3359839
    yours Hardy
    "David Waz.." <dlwpickpro.com> wrote in message
    news:01bd01c3419d$daf58420$a501280aphx.gbl...
    > Sounds like dynamic controls not being re-created on post-
    > back.
    >
    > The structure of your controls (what control 'contains'
    > other controls) affect the control's name. When the
    > structure changes, the control's name changes. When the
    > LoadViewState event fires, the names in the viewstate may
    > not match the controls if the dynamic controls change
    > structure.
    >
    > Load View State event is one if the FIRST events to fire,
    > just after INIT - so I don't know how you could be
    > changing the structure.
    >
    > I usually get this control while I'm in development mode
    > and recompile the APP (with structure change) and try to
    > refresh the browser - if the structure changed, I get the
    > exact same message - causing me to navigate to the page
    > instead of refresh the last post event.
    >
    > Good luck!
    >
    > >-----Original Message-----
    > >Hi all:
    > > I developed a web site, it passed various testing
    > internally. When I put
    > >this site in production, I receive some error reports
    > from this site saying
    > >

    Hardy Wang Guest

  5. #5

    Default Re: The viewstate is invalid for this page and might be corrupted problem

    Hardy,

    If you create any dynamic controls make sure that you recreate the control
    tree the same way it existed when the page was orignally rendered and sent
    off to the browser client. LoadViewState can actually occur at several
    points in the life-cycle even though it only "shows up" in most life-cycle
    diagrams in one place (immediately after Init). As long as the nesting of
    controls is consistent with the original rendering of the page, controls
    will "catch-up" in the life-cycle when they are added dynamically (say in
    OnLoad, which happens after LoadViewState).

    If a control wants its viewstate but it is out of sequence with where it
    originally was the page framework gets angry and raises the exception you
    received. When I have this problem, dynamic controls created out of
    sequence is almost always the reason.

    Do you programmatically added any controls to Control collections? e.g.
    Controls.Add(new Button())

    Best regards,
    Graham.

    "Hardy Wang" <hardy_wangmarketrend.com> wrote in message
    news:uNKk2qZQDHA.2636TK2MSFTNGP10.phx.gbl...
    > Hi all:
    > I developed a web site, it passed various testing internally. When I
    put
    > this site in production, I receive some error reports from this site
    saying
    > "the viewstate is invalid for this page and might be corrupted". I am
    > wandering what kind of client side problem may cause this error? Is it
    > possible that user uses a browser which has local cache turned on all the
    > time?
    >
    > Thanks for any suggestion.
    >
    > --
    > WWW: [url]http://hardywang.1accesshost.com[/url]
    > ICQ: 3359839
    > yours Hardy
    >
    >

    Graham Guest

  6. #6

    Default Re: The viewstate is invalid for this page and might be corrupted problem

    I did not programmatically add any controls to Control collections. All my
    controls are defined design-time. So that is the reason I feel very
    headache.

    --
    WWW: [url]http://hardywang.1accesshost.com[/url]
    ICQ: 3359839
    yours Hardy
    "Graham" <grahamtecskor.com> wrote in message
    news:uXqKFlaQDHA.2476TK2MSFTNGP10.phx.gbl...
    > Hardy,
    >
    > If you create any dynamic controls make sure that you recreate the control
    > tree the same way it existed when the page was orignally rendered and sent
    > off to the browser client. LoadViewState can actually occur at several
    > points in the life-cycle even though it only "shows up" in most life-cycle
    > diagrams in one place (immediately after Init). As long as the nesting of
    > controls is consistent with the original rendering of the page, controls
    > will "catch-up" in the life-cycle when they are added dynamically (say in
    > OnLoad, which happens after LoadViewState).
    >
    > If a control wants its viewstate but it is out of sequence with where it
    > originally was the page framework gets angry and raises the exception you
    > received. When I have this problem, dynamic controls created out of
    > sequence is almost always the reason.
    >
    > Do you programmatically added any controls to Control collections? e.g.
    > Controls.Add(new Button())
    >
    > Best regards,
    > Graham.
    >
    > "Hardy Wang" <hardy_wangmarketrend.com> wrote in message
    > news:uNKk2qZQDHA.2636TK2MSFTNGP10.phx.gbl...
    > > Hi all:
    > > I developed a web site, it passed various testing internally. When I
    > put
    > > this site in production, I receive some error reports from this site
    > saying
    > > "the viewstate is invalid for this page and might be corrupted". I am
    > > wandering what kind of client side problem may cause this error? Is it
    > > possible that user uses a browser which has local cache turned on all
    the
    > > time?
    > >
    > > Thanks for any suggestion.
    > >
    > > --
    > > WWW: [url]http://hardywang.1accesshost.com[/url]
    > > ICQ: 3359839
    > > yours Hardy
    > >
    > >
    >
    >

    Hardy Wang Guest

Similar Threads

  1. Problem with Page Object (it is invalid)
    By RickL in forum ASP Components
    Replies: 0
    Last Post: January 5th, 03:56 PM
  2. Replies: 0
    Last Post: July 25th, 04:58 AM
  3. The View State Is Invalid for This Page and Might Be Corrupted
    By Mike Turpin in forum ASP.NET General
    Replies: 1
    Last Post: July 16th, 04:48 PM
  4. sometimes clients get : viewstate invalid error , anyone knows why ?
    By Ersin Gençtürk in forum ASP.NET General
    Replies: 4
    Last Post: June 30th, 07:12 AM
  5. The viewstate is invalid for this page and might be corrupted
    By Gordon Moore in forum ASP.NET General
    Replies: 0
    Last Post: June 27th, 04:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139