ViewState Error! Please help!

G

Guest

Hello

We have a web application developed in .NET using VB.NET. We get the error below every now and then and can't figure out how to correct it. The viewstate this error refers to is pretty large, but I havn't seen any restrictions on a viewstates size. It there a fix for this that I don't know about besides recoding this page using no viewstate? Any help would be appreciated!

System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException: The viewstate is invalid for this page and might be corrupted
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium(
at System.Web.UI.Page.LoadPageViewState(
at System.Web.UI.Page.ProcessRequestMain(
--- End of inner exception stack trace --
at System.Web.UI.Page.HandleError(Exception e
at System.Web.UI.Page.ProcessRequestMain(
at System.Web.UI.Page.ProcessRequest(
at System.Web.UI.Page.ProcessRequest(HttpContext context
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute(
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously

Thanks

Nick We
 
T

Teemu Keiski

Hi,

with this info it is hard to say but try to see MS KB's about the subject.

http://support.microsoft.com/search...ON&QuerySource=gsfxSearch_Query&srchExtraQry=

(watch for wrapping)

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


Hello,

We have a web application developed in .NET using VB.NET. We get the error
below every now and then and can't figure out how to correct it. The
viewstate this error refers to is pretty large, but I havn't seen any
restrictions on a viewstates size. It there a fix for this that I don't
know about besides recoding this page using no viewstate? Any help would be
appreciated!!

System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException:
The viewstate is invalid for this page and might be corrupted.
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadPageViewState()
at System.Web.UI.Page.ProcessRequestMain()
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)

Thanks,

Nick Weg
 
G

Guest

Teemu,

Thanks for the info! I have read a couple of the articles you have recommended before. We donot operate in a Web Farm enviorment so that cause is ruled out. We don't have any data that contains many decimals places so that cause is ruled out. We do not do any server.transfers so that cause is ruled out. The error we get doesn't provides us with any useful information so the fix they offer may help us determine what the error is in more detail. Also, this may be the cause: You modify your pages, which causes the shadow, copied files in the Temporary ASP.NET files folder to be regenerated. A user has a copy of the page that was requested before this change, and the user posts the page after the files in that folder were regenerated. The only problem with this idea is we don't change the files that are experiencing this issue very often. So, my next question would be: let's say we modified one of these pages 2 weeks ago. Could a person who hasn't accessed this page for 2 months still have a old copy which could cause this problem? Before we go applying any of these fixes to the .NET framework, we want to be confident that we are applying the correct fix. Microsoft scares my by saying we should only apply the fix if we know it will solve the issue. Any advice would help us out greatly!!! Have you heard of this problem before?

Thanks for your help!

Nick Wegner
 
T

Teemu Keiski

Hi,

and there aren't any indication of extra application startup in logs
whatsoever? I am just after that if machine keys change (as they do when
they are autogenerated) which could be one reason. See this article:
http://www.eggheadcafe.com/articles/20030514.asp

how to setup machine keys to be static (even if you don't have a web farm)
so that app restart wouldn't change them

And to answer your question, I've seen people having problems with this. And
no, there wouldnt' be any copies after two months. Just to ask more, in
exactly what kind of situation & page the error arises? What Framework
version you had?

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


Teemu,

Thanks for the info! I have read a couple of the articles you have
recommended before. We donot operate in a Web Farm enviorment so that cause
is ruled out. We don't have any data that contains many decimals places so
that cause is ruled out. We do not do any server.transfers so that cause is
ruled out. The error we get doesn't provides us with any useful information
so the fix they offer may help us determine what the error is in more
detail. Also, this may be the cause: You modify your pages, which causes
the shadow, copied files in the Temporary ASP.NET files folder to be
regenerated. A user has a copy of the page that was requested before this
change, and the user posts the page after the files in that folder were
regenerated. The only problem with this idea is we don't change the files
that are experiencing this issue very often. So, my next question would be:
let's say we modified one of these pages 2 weeks ago. Could a person who
hasn't accessed this page for 2 months still have a old copy which could
cause this problem? Before we go applying any of these fixes to the .NET
framework, we want to be confident that we are applying the correct fix.
Microsoft scares my by saying we should only apply the fix if we know it
will solve the issue. Any advice would help us out greatly!!! Have you
heard of this problem before?

Thanks for your help!

Nick Wegner
 
M

Marshal Antony

Hi Nick,

Here is a dicussion on this:
http://webwizguide.info/forum/forum_posts.asp?TID=5744&PN=1

Hope this helps.
Regards,
Marshal Antony
..NET Developer
http://www.dotnetmarshal.com


Nick Weg said:
Hello,

We have a web application developed in .NET using VB.NET. We get the
error below every now and then and can't figure out how to correct it. The
viewstate this error refers to is pretty large, but I havn't seen any
restrictions on a viewstates size. It there a fix for this that I don't
know about besides recoding this page using no viewstate? Any help would be
appreciated!!
System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException:
The viewstate is invalid for this page and might be corrupted.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top