473,382 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Invalid_Viewstate - Please help!

Hi Everyone,
Occasionally i'm getting the following error logged. I've heard this
can be caused by proxy servers. Does anyone know anyways to resolve the
issue or anything else that could cause the issue.

Thanks
James

[Error]

System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. --->
System.Web.HttpException: Invalid_Viewstate
Client IP: 88.105.241.198
Port: 2352
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322)
ViewState:
dDwtNjc4MDAyODQ1O3Q8O2w8aTwzPjs+O2w8dDw7bDxpPDE+Oz 47bDx0PEAwPHA8cDxsPERhdGFLZXlzO18hSXRlbUNvdW50Oz47 bDxsPD47aTwxPjs+Pjs+Ozs7Ozs7Ozs+O2w8aTwwPjs+O2w8dD w7bDxpPDE+O2k8Mz47aTw1PjtpPDc+O2k8OT47aTwxMD47Pjts PHQ8cDxwPGw8SW1hZ2VVcmw7TmF2aWdhdGVVcmw7PjtsPC4uL1 Byb3BlcnR5SW1hZ2VzLzgyLTNfdGh1bWIuanBnOy4uL0hvbWVC dXllcnMvUHJvcGVydHlWaWV3LmFzcHg/UHJvcGVydHlJRD04Mjs+Pjs+Ozs+O3Q8cDxwPGw8TmF2aWdhdG VVcmw7PjtsPC4uL0hvbWVCdXllcnMvUHJvcGVydHlWaWV3LmFz cHg/UHJvcGVydHlJRD04Mjs+Pjs+O2w8aTwwPjs+O2w8dDxAPEFza2 luZyBQcmljZSDCozQwMCwwMDA7Pjs7Pjs+Pjt0PHA8cDxsPE5h dmlnYXRlVXJsOz47bDwuLi9Ib21lQnV5ZXJzL1Byb3BlcnR5Vm lldy5hc3B4P1Byb3BlcnR5SUQ9ODI7Pj47PjtsPGk8MD47Pjts PHQ8QDw0Oz47Oz47Pj47dDxwPHA8bDxOYXZpZ2F0ZVVybDs+O2 w8Li4vSG9tZUJ1eWVycy9Qcm9wZXJ0eVZpZXcuYXNweD9Qcm9w ZXJ0eUlEPTgyOz4+Oz47bDxpPDA+Oz47bDx0PEA8SG91c2U7Pj s7Pjs+Pjt0PHA8cDxsPE5hdmlnYXRlVXJsOz47bDwuLi9Ib21l QnV5ZXJzL1Byb3BlcnR5Vmlldy5hc3B4P1Byb3BlcnR5SUQ9OD I7Pj47PjtsPGk8MD47PjtsPHQ8QDxQbGFjZSBhIEZSRUUgYWQg Tk9XIHNlZSBIb21lIHNlbGxlcnMgcGFnZTs+Ozs+Oz4+O3Q8QD wuLi9Ib21lQnV5ZXJzL1Byb3BlcnR5Vmlldy5hc3B4P1Byb3Bl cnR5SUQ9ODI7RnJvbnQgUGFnZSBBZHZlcnQgZm9yIFlvdXIgUH JvcGVydHkhOz47Oz47Pj47Pj47Pj47Pj47Pvd76txaNLSVFxPk S2M3/7tMO/GQ
Http-Referer:
http://www.homester.co.uk/(iuenpv55q...OVMTC=standard
Path: /Index.aspx. ---> System.Web.HttpException:
Authentication of viewstate failed. 1) If this is a cluster, edit
<machineKey> configuration so all servers use the same validationKey
and validation algorithm. AutoGenerate cannot be used in a cluster.
2) Viewstate can only be posted back to the same page. 3) The
viewstate for this page might be corrupted. --->
System.Web.HttpException: Unable to validate data.
at System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
at System.Web.UI.LosFormatter.Deserialize(String input)
--- End of inner exception stack trace ---
at System.Web.UI.LosFormatter.Deserialize(String input)
at System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
--- End of inner exception stack trace ---
at System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
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.Htt pApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step,
Boolean& completedSynchronously

Mar 2 '06 #1
2 1679
DWS
InnoCreate,
A little bit too much info on this post. Next time change ip to 192.168.1.1

Yes this could be caused by a proxy server but you'd probably
also have errors like user A can see user b's web pages.

I sometimes get errors like this when developing and I change the page while
its
still running in another browser, when controls that are created on the fly
aren't
available on the server when the viewstate is checked by asp.net, when using
the
restart button in visual studio (thats same as still running in another
browser)

Look for someone making changes outside a move to production cycle
Look for someone debugging on the production server.
Look for controls that are created on the fly.

Good Luck
DWS
"InnoCreate" wrote:
Hi Everyone,
Occasionally i'm getting the following error logged. I've heard this
can be caused by proxy servers. Does anyone know anyways to resolve the
issue or anything else that could cause the issue.

Thanks
James

[Error]

System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. --->
System.Web.HttpException: Invalid_Viewstate
Client IP: 88.105.241.198
Port: 2352
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322)
ViewState:
dDwtNjc4MDAyODQ1O3Q8O2w8aTwzPjs+O2w8dDw7bDxpPDE+Oz 47bDx0PEAwPHA8cDxsPERhdGFLZXlzO18hSXRlbUNvdW50Oz47 bDxsPD47aTwxPjs+Pjs+Ozs7Ozs7Ozs+O2w8aTwwPjs+O2w8dD w7bDxpPDE+O2k8Mz47aTw1PjtpPDc+O2k8OT47aTwxMD47Pjts PHQ8cDxwPGw8SW1hZ2VVcmw7TmF2aWdhdGVVcmw7PjtsPC4uL1 Byb3BlcnR5SW1hZ2VzLzgyLTNfdGh1bWIuanBnOy4uL0hvbWVC dXllcnMvUHJvcGVydHlWaWV3LmFzcHg/UHJvcGVydHlJRD04Mjs+Pjs+Ozs+O3Q8cDxwPGw8TmF2aWdhdG VVcmw7PjtsPC4uL0hvbWVCdXllcnMvUHJvcGVydHlWaWV3LmFz cHg/UHJvcGVydHlJRD04Mjs+Pjs+O2w8aTwwPjs+O2w8dDxAPEFza2 luZyBQcmljZSDCozQwMCwwMDA7Pjs7Pjs+Pjt0PHA8cDxsPE5h dmlnYXRlVXJsOz47bDwuLi9Ib21lQnV5ZXJzL1Byb3BlcnR5Vm lldy5hc3B4P1Byb3BlcnR5SUQ9ODI7Pj47PjtsPGk8MD47Pjts PHQ8QDw0Oz47Oz47Pj47dDxwPHA8bDxOYXZpZ2F0ZVVybDs+O2 w8Li4vSG9tZUJ1eWVycy9Qcm9wZXJ0eVZpZXcuYXNweD9Qcm9w ZXJ0eUlEPTgyOz4+Oz47bDxpPDA+Oz47bDx0PEA8SG91c2U7Pj s7Pjs+Pjt0PHA8cDxsPE5hdmlnYXRlVXJsOz47bDwuLi9Ib21l QnV5ZXJzL1Byb3BlcnR5Vmlldy5hc3B4P1Byb3BlcnR5SUQ9OD I7Pj47PjtsPGk8MD47PjtsPHQ8QDxQbGFjZSBhIEZSRUUgYWQg Tk9XIHNlZSBIb21lIHNlbGxlcnMgcGFnZTs+Ozs+Oz4+O3Q8QD wuLi9Ib21lQnV5ZXJzL1Byb3BlcnR5Vmlldy5hc3B4P1Byb3Bl cnR5SUQ9ODI7RnJvbnQgUGFnZSBBZHZlcnQgZm9yIFlvdXIgUH JvcGVydHkhOz47Oz47Pj47Pj47Pj47Pj47Pvd76txaNLSVFxPk S2M3/7tMO/GQ Http-Referer:
http://www.homester.co.uk/(iuenpv55q...OVMTC=standard
Path: /Index.aspx. ---> System.Web.HttpException:
Authentication of viewstate failed. 1) If this is a cluster, edit
<machineKey> configuration so all servers use the same validationKey
and validation algorithm. AutoGenerate cannot be used in a cluster.
2) Viewstate can only be posted back to the same page. 3) The
viewstate for this page might be corrupted. --->
System.Web.HttpException: Unable to validate data.
at System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
at System.Web.UI.LosFormatter.Deserialize(String input)
--- End of inner exception stack trace ---
at System.Web.UI.LosFormatter.Deserialize(String input)
at System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
--- End of inner exception stack trace ---
at System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
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.Htt pApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step,
Boolean& completedSynchronously

Mar 2 '06 #2
All my company's web applications live in a web farms. It is recommended that you set the <machineKey> in the web.config and not use the autosettings. I let the references speak for themselves as to the magic it does.

I set the <machineKey> in my web.config file and have never had a problem. It is very easy to do. The hardest part was coming up with the extremely long validationKey and decryptionKey.

Hope this helps.

References
From Microsoft:
http://msdn.microsoft.com/library/de...keysection.asp

Real world example:
http://www.hanselman.com/blog/Commen...f08a9a5f5.aspx


System.Web.HttpException:
Authentication of viewstate failed. 1) If this is a cluster, edit
<machineKey> configuration so all servers use the same validationKey
and validation algorithm. AutoGenerate cannot be used in a cluster.
2) Viewstate can only be posted back to the same page. 3) The
viewstate for this page might be corrupted. --->
Mar 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: Chris Sutton | last post by:
I have a production asp.net application that is getting seemingly random Viewstate errors. It is a single server, so there isn't any issue with posting viewstate to a different server that what...
3
by: Jennyfer J Barco | last post by:
Hello I'm sending this again since I didn't have any answer 5 days before I sent this e-mail. Hello, Sometimes I'm getting this Application error: Error:Invalid_Viewstate Client IP:...
3
by: some one | last post by:
I have kind of wired problem, I using httpwebrequest to post form data to server , in the GetResponse stage a WebException occurred, after tracing the actual error that occurs on the server, I...
1
by: dima | last post by:
Hi All, I know some of you had this problem in production. Did anyone find out how to fix this problem or what is the cause of it? System.Web.HttpException: Invalid_Viewstate ...
1
by: Bill Sempf | last post by:
Trying again on this forum to see if anyone has seen this error: I am receiving an Invalid_Viewstate error on one of my sites, and the error message content has SMTP Mail header text in it! Here...
1
by: adrian.besimi | last post by:
Hi, I got a serious problem regarding the Server.Execute and/or Server.Transfer. Here's the idea of my application: I have 1 web page named Default.aspx where I execute all my other pages.
1
by: =?Utf-8?B?UGF1bCBQaGlsbGlwcw==?= | last post by:
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...
1
by: =?Utf-8?B?UGF1bCBQaGlsbGlwcw==?= | last post by:
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...
1
by: netwapps | last post by:
I have: Application Type: Web application with VB.net 1.1 WebServer: IIS6 Machine Server: Windows 2003 The User opens 4-5 browsers connecting to the application and clicks on the Autorefresh...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.