Türkçe   |   English
Calendar
Categories
Archive
Links
Blogroll
Files

Invalid Viewstate Exception - 20.04.2009
It is certain that you have recieved "System.Web.HttpException: The client disconnected. ---> System.Web.UI.ViewStateException: Invalid viewstate" message if you are logging exceptions in a web application. There are lots of reasons of this problem. These reasons may be the difference in machine key configuration of applications that are running in a web farm, Firewall or antivirus softwares that running on web server or trimming of hidden viewstate field at client's proxy server or firewall. However there are no possible solutions that can be made by developer for the first two reasons, there is a solution for the last reason. In web.config file at the pages element of System.Web node you can set maxPageStateFieldLength property to 512 or another value by typing maxPageStateFieldLength="512". This change made to web.config file will cause the application split viewstate field to strings that maximum 512 character length. I had significant decrease at the number of Invalid Viewstate errors.
Clues,Codes

Add Comment
First Name Last Name
Web Site
E-Mail
Comment
Security Picture

Photos

Microsoft Code Trip Bus
Show All
Me in MSDN Forums
-   Answered the question Close some open windows by name in the Visual C# General forum
-   Answered the question Close some open windows by name in the Visual C# General forum
-   Answered the question Datagridview Click Event in C#.net in the Visual C# General forum
-   Contributed a proposed answer to the question Close some open windows by name in the Visual C# General forum
-   Replied to the question Datagridview Click Event in C#.net in the Visual C# General forum
-   Replied to the question Close some open windows by name in the Visual C# General forum
-   Contributed a helpful post (total votes:2) to the forums thread Array of events? in the Visual C# General forum
-   Answered the question Displaying random images from resources in the project in the Visual C# Language forum
-   Contributed a helpful post (total votes:1) to the forums thread sorted dictionary (Can i get key from value) in the Visual C# General forum
-   Contributed a proposed answer to the question Non-existing Argument in format string in the Visual C# General forum
Entries
News
Articles