"ViewState is invalid" after a Response.Redirect RRS feed

  • Question

  • User-184505905 posted

    I'm developing a WAP 2.0 application using Visual Studio.NET 2003.  I have a login form. When the user clicks Submit, the following pseudo-code is executed in Button_Click:

    Button_Click (...)
        ... // validate login information code, set up a Session, then

    This works just fine using the OpenWave emulator (which seems to be way too forgiving), but when I use the YoSpace emulator it fails with every single phone model. The Sharp CX-31 phone displays the message, "The ViewState is invalid or may be corrupted".

    I've tried disabling view state on the Page, clearing the Response buffer, setting the page not to cache, everything I can think of.  Server.Transfer works but if the user Reloads the destination page (success.aspx), it executes the Button_Click() event from the Login page all over again, which isn't what I want.

    If anyone can explain how to get Response.Redirect to work after a PostBack I'd appreciate it.

    Thursday, January 26, 2006 1:42 PM

All replies

  • User-891526991 posted
    Actually the session timeout is 20 mins by default. There are lot factors which will affect the mobile web application session time and hence viewstate. For example you will get session expiry error when request a new page becoz the antivirus installed on the web server ends the session sometimes while scanning.

    In ur app try to increase the session time and check. It will work.

    Friday, January 27, 2006 8:51 AM