?
Solved

Help with unusual error message (System.Web.HttpException: Invalid_Viewstate)

Posted on 2004-10-20
9
Medium Priority
?
939 Views
Last Modified: 2008-01-09
I was looking through the logs on one of my applications today when I noticed a strange error message that I'm having trouble explaining.  The text of the exception is pasted below.  Does anyone have any idea what this is, or if I should be worried?  The app has been running for a couple of weeks now, but this is the first time I have got this, or any other message.

Thanks in advance.

-------------------------------------------------

System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException: Invalid_Viewstate
      Client IP: *.*.*.*
      Port: 12779
      User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
      ViewState: dDwtMjA0OTU3MjU4Mjt0PDtsPGk8MT47PjtsPHQ8O2w8aTw2PjtpPDg+O2
k8OT47PjtsPHQ8O2w8aTwxPjtpPDM+O2k8NT47aTwyMz47PjtsPHQ8dDw7O2w8aTwwPjs+P
js7Pjt0PHQ8OztsPGk8MD47Pj47Oz47dDx0PDs7bDxpPDA+Oz4+Ozs+O3Q8O2w8aTwxPjs+O2
w8dDx0PDs7bDxpPDA+Oz4+Ozs+Oz4+Oz4+O3Q8O2w8aTw1PjtpPDc+Oz47bDx0PDtsPGk8M
T47PjtsPHQ8dDw7O2w8aTwwPjs+PjsC_://w

8%@.e50
A0
cAccept: */*
Accept-Language: en-gb
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Referer: http://www.domain.com/page.aspx
n7Pjs+Pjt0PHQ8OztsPGk8MD47Pj47Oz47Pj47dDw7bDxpPDE+O2k8Mz47PjtsPH
Q8dDw7O2w8aTwwPjs+Pjs7Pjt0PDtsPGk8MT47PjtsPHQ8dDw7O2w8aTwwPjs+Pjs7Pjs+Pjs+
Pjs+Pjs+PjtsPEltYWdlQnV0dG9uSW50cm9OZXh0Oz4+o6MLqRFWGkZ7+b+E8c7OLh5wsCk=
      Http-Referer: http://www.domain.com/(t2emvz55i0cih4u4nohmpg55)/page.aspx
      Path: /page.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)

-------------------------------------------------
0
Comment
Question by:Psychotext
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 28

Assisted Solution

by:mmarinov
mmarinov earned 1600 total points
ID: 12357711
0
 
LVL 2

Author Comment

by:Psychotext
ID: 12357823
Not using the application updater block, but I was interested to read "This error usually means someone is trying to mess with url id's" in the second link.  My initial thoughts on the error were that someone was either trying to modify the viewstate, and failing or that the viewstate had been corrupted on transmission which caused the failure.

I think above all though I'm trying to rule out poor programming on my part! :)
0
 
LVL 28

Accepted Solution

by:
mmarinov earned 1600 total points
ID: 12357854
Psychotext,

also check this kbarticle : http://www.kbalertz.com/kb_829743.aspx
B..M
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Author Comment

by:Psychotext
ID: 12358256
Looks like a good article, thanks.  I will work through it and post back later.
0
 
LVL 23

Assisted Solution

by:Snarf0001
Snarf0001 earned 400 total points
ID: 12362944
I've encountered that error a few times if the session times out and then the user tries to post back.
0
 
LVL 2

Author Comment

by:Psychotext
ID: 12364214
I'll check into that, thanks.
0
 
LVL 2

Author Comment

by:Psychotext
ID: 12368691
Ok, have looked into the problem.  

First thing I did was check everything noted in the kb article (http://www.kbalertz.com/kb_829743.aspx).  ViewstateMac is enabled, so this may very well have caused the problem.  The same IP address logged a couple more errors a few mins later so it's possible the user was up to something or they had their browser configured in a strange way to cause it.  I think I may check into the truncation issue that they mention by altering the way the viewstate is handled.  I found a pretty good article on handling state generally: http://www.eggheadcafe.com/articles/20040613.asp . It's pretty involved, so I haven't got around to doing any testing with it yet.  It may prove useful for others interested in the viewstate in general though.

On the postback issue - In this particular app, when the session expires the user is redirected using one of two methods.  The first is a meta tag refresh inserted into the page and calculated on run time.  If this fails, the system checks the session on each postback to ensure that the timeout has not been reached.  In either case, the app clears both the session state and the viewstate to ensure that nothing remains.  There is a possiblity that the user clicked back to the first screen (Check is not performed here) and then moved through the app, but that's probably unlikely.

I'm not sure I'm going to really be able to work out what happened here, but thanks to you both I now have a much better idea of what it could have been and what to look out for in the future (Though I'm hoping it doesn't happen again).  Thanks.
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 12368715
Though I'm hoping it doesn't happen again -> I wish you not to happen again
glad that you move to the next step
Regards!
B..M
0
 
LVL 2

Author Comment

by:Psychotext
ID: 12368744
p.s.  You can ignore the first three paragraphs in the article I linked to.  The guy seems to have lost the plot a little.  This article is less self satisfied and discusses the same thing, but minus the performance tests: http://aspalliance.com/72
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question