all groups > inetserver asp general > november 2007 >
You're in the

inetserver asp general

group:

Invalid_viewstate exception



Invalid_viewstate exception Paul Phillips
11/1/2007 12:46:02 PM
inetserver asp general: I have read many things about this but I haven't got a clear vision on what
to do if anything about this.



I have a system that tries to find holes in my web site. One of the things
it has found and has been sent to me is

an Invalid_Viewstate exception. I will provide the stack trace below. If
you read down the stack trace it talks about "Invalid chararcter in a base-64
string" error. After reading much about this have not found any resolution.
I did read where one person said that people hit sites that require
information and they sending bad or spam in hopes the site will forward the
information on to an email and my site is capturing that because they also
are changing the hidden field _VIEWSTATE which in turn causes this exception.
I also read that the data that is being entered is not passing validation
and there is a need to trap for it.



so I still don't know what is exactly causing this error and should I worry
about it.



Here is the stack trace

The error description is as follows :

System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException:
Invalid_Viewstate

Client IP: 64.14.3.222

Port: 40520

User-Agent: Mozilla/5.0 (compatible; MSIE 7.0; MSIE 6.0; ScanAlert;
+http://www.scanalert.com/bot.jsp) Firefox/2.0.0.3

ViewState: ("blah blah blah" a bunch of encrypted data or something that I
am just going to leave out)

Http-Referer:

Path: /folder/myGatherInformationPage.aspx. ---> System.FormatException:
Invalid character in a Base-64 string.

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()

--- 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)



Any help would greatly be appreciated.



PaulP

MCP
Re: Invalid_viewstate exception Anthony Jones
11/2/2007 12:00:00 AM
[quoted text, click to view]

Try asking this in the dotnet.framework.aspnet group. This one is for
Classic ASP.

--
Anthony Jones - MVP ASP/ASP.NET

AddThis Social Bookmark Button