Print Page | Close Window

View state

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=5744
Printed Date: 28 March 2026 at 9:10pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: View state
Posted By: Mart
Subject: View state
Date Posted: 14 September 2003 at 9:01am

Every so often i get this very annoying error:

Server Error in '/' Application.

The View State is invalid for this page and might be corrupted.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The View State is invalid for this page and might be corrupted.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The View State is invalid for this page and might be corrupted.]
   System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +151
   System.Web.UI.Page.LoadPageViewState() +16
   System.Web.UI.Page.ProcessRequestMain() +421


Version Information: Microsoft .NET Framework Version:1.0.3705.288; ASP.NET Version:1.0.3705.288

How can i prevent it?

Thanks, Mart.




Replies:
Posted By: Diep-Vriezer
Date Posted: 14 September 2003 at 9:25am

Isn't this somesort of a feature in the web.config file? If so, try turning it off, or update your .NET framework.



-------------
Gone..


Posted By: otaku
Date Posted: 14 September 2003 at 12:37pm

You probably uses Server.Transfer in your page,
if yes follow the link below to resolve this problem:

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q316/9/20.asp&NoWebContent=1 - http://support.microsoft.com/default.aspx?scid=http://suppor t.microsoft.com:80/support/kb/articles/Q316/9/20.asp&NoW ebContent=1



-------------
Martial Boissonneault
http://getElementById.com/


Posted By: Mart
Date Posted: 15 September 2003 at 9:20am

Nope and Nope, I tried using the header EnableViewState="false" and it still happens and it doesnt use server.transfer.

Any other ideas?

Thanks, Mart.



Posted By: otaku
Date Posted: 15 September 2003 at 10:06am

Try this other fix from Microsoft:

http://support.microsoft.com/default.aspx?scid=kb;en-us;323744 - http://support.microsoft.com/default.aspx?scid=kb;en-us;3237 44



-------------
Martial Boissonneault
http://getElementById.com/


Posted By: Mart
Date Posted: 16 September 2003 at 9:12am

Thanks, but there has to be a pernament way... How can MS just tell you to change the URL???  Its there error they should release a patch!

I mean how I am supposde to tell my visitors to change the URL if they get a viewstate error!

Does anyone know a trick to fix this?

Thanks, Mart



Posted By: Diep-Vriezer
Date Posted: 16 September 2003 at 9:16am


-------------
Gone..


Posted By: otaku
Date Posted: 16 September 2003 at 10:15am

Hello Mart,

Thanks, but there has to be a pernament way...

Did you acquired the hotfix from Microsoft like they suggest in the link i give you ?  An other thing you can do is to upgrade to Framework 1.1 cause this bug is for Framework 1.0

I mean how I am supposde to tell my visitors to change the URL if they get a viewstate error!

Is this the hotfix from Microsoft ??? What i know about this bug is that only occurs on production server so your visitors won't see it. But you see that error and i understand your frustation. Last suggestion from me is to recreate an other project with vs.net and imports your files.



-------------
Martial Boissonneault
http://getElementById.com/


Posted By: Diep-Vriezer
Date Posted: 16 September 2003 at 1:47pm
As I sead (  ), I'm running the 1.1 framework, and don't have problems at all, except the ones I made because of my n00bness.

-------------
Gone..


Posted By: otaku
Date Posted: 16 September 2003 at 3:11pm
Thanks for explanation Diep-Vriezer, I precisely wondered what you wanted to say !!!

-------------
Martial Boissonneault
http://getElementById.com/


Posted By: Diep-Vriezer
Date Posted: 16 September 2003 at 11:55pm
It's a miracle

-------------
Gone..


Posted By: Mart
Date Posted: 17 September 2003 at 10:11am
I can't apply the fix cos my sites on a host, but this seems to work

  1. Create an .aspx page, and then add a Button server control to the page.
  2. Use the following URL to open the page in your browser:

    http://localhost/myweb/page.aspx

  3. Modify the .aspx page so that the page is recompiled.
  4. Open a new instance of the browser.
  5. Use the following URL (notice the difference in the capitalization of "myweb") to open the page in the new instance of the browser:

    http://localhost/MyWeb/page.aspx

  6. Return to the original instance of the browser, and then click Submit. Notice that you receive the error message that is listed in the "Symptoms" section.
But obviously my visitors cant do that!



Posted By: Diep-Vriezer
Date Posted: 17 September 2003 at 10:22am

Why don't you tell your host to update his framework or you're gone?



-------------
Gone..


Posted By: otaku
Date Posted: 17 September 2003 at 12:52pm

My god Mart in your last post you are just reproduce the bug ??? They give us those 6 steps to show us how to reproduce the behavior. Look in the RESOLUTION section instead:

RESOLUTION

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix...

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS - http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTA CTMS

Like i said before, usually this bug only occurs on production server that's why you see localhost in the Steps to Reproduce the Behavior section. But if you have that bug with your hosting provider, like Diep-Vriezer said, you better ask them to update to framework 1.1 or leave



-------------
Martial Boissonneault
http://getElementById.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net