Need Help With ViewState Error

G

Guest

We keep getting the following error:

-----------------------------------------------------------------------------------------------
Final Exception
System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. --->
System.Web.HttpException: Invalid_Viewstate_Client_Disconnected Client
IP: 65.83.116.10 Port: 40561 User-Agent: Mozilla/4.0 (compatible; MSIE
6.0; Windows NT 5.1; .NET CLR 1.1.4322) ViewState:

//View State Omitted (VERY LARGE)

System.FormatException: Invalid length for a Base-64 char array. at
System.Convert.FromBase64String(String s) at
System.Web.UI.LosFormatter.Deserialize(String input) at
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() --- End of inner
exception stack trace --- at
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() at
System.Web.UI.Page.LoadPageViewState() at
System.Web.UI.Page.ProcessRequestMain()
----------------------------------------------------------------------------------------------

We are using .NET 1.1. We do not have a webfarm or garden. The application
is on a server running Windows Server 2003 Standard.

Does anyone know how to resolve this error? We have looked everywhere and
cannot find a solution to this problem.

Thanks in advance!
 
J

jan.hancic

This is a guess: it appears that you have many controls on your form
with wievstate enabled. And becouse of that the hidden filed that holds
the view state got very large.
Judging from this:
System.FormatException: Invalid length for a Base-64 char array. at
System.Convert.FromBase64String(String s) at

Try setting the ViewState to false on every control that does' not need
a viewstate.
Hope this helps.

lp
Jan Hancic
http://cwizo.blogspot.com
 
G

Guest

Jan,

We do not have any controls on this form that do not need thier viewstate.
Are you pretty sure that this issue is the size of the viewstate and not some
other issue?

If this is the problem, then the only way to resolve it is to repopulate the
controls every time the page is loaded, right?
 
J

jan.hancic

I am not shure. I am just making conclusion from th exception.
Just how many controls are we talking about here? And what type of
controls.

You could also split the form into multiple forms...

lp
Jan Hancic
http://cwizo.blogspot.com
 
B

bruce barker \(sqlwork.com\)

this error is generally caused by the viewstate being too large and getting
truncated by a proxy server.

-- bruce (sqlwork.com)
 

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,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top