Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Web.UI.ViewStateException: Invalid viewstate

I have a web application developed in ASP.net & C#. I also use Telerik ASP.NET AJAX for web UI. Application throws an exception (System.Web.UI.ViewStateException: Invalid viewstate) in production server. It works fine in test server. And this error is thrown randomly.

System.Web.UI.ViewStateException: Invalid viewstate. 
Client IP: x.x.x.x
Port: xxxxx
Referer: http://webaddress/Page.aspx
Path: /Page.aspx
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; CMNTDF; BRI/1; InfoPath.3; BRI/2; .NET4.0C)
ViewState: /wEPDwUILT ... [further contents omitted for this question]
like image 503
sooraj.e Avatar asked Nov 24 '11 04:11

sooraj.e


People also ask

What does invalid ViewState mean?

The main reason for "Invalid Viewstate" error is the exception is thrown when the ViewState has become "large" and the user clicks a button before a previous request has completed...

What causes invalid ViewState errors?

The error message is caused by some exception being thrown when the view state is being processed. The problem is that the exception is being consumed, and its details are lost in the error message. By using a debugger, you can determine the original exception.


1 Answers

There are a host of reasons why this could occur, a common one being worker process recycling/Application Pool Recycling on your IIS server.

Have a look at the below articles to try and debug why exactly it is occuring with you:

http://support.microsoft.com/kb/555353

More specifically to determine the error have a look at the "Determine exactly what exception occurs when you receive the error message" part in the below link:

http://support.microsoft.com/kb/829743

like image 67
TBohnen.jnr Avatar answered Sep 25 '22 15:09

TBohnen.jnr