473,398 Members | 2,812 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,398 software developers and data experts.

Error occurs when clicking after 15 minutes

When I click after about 15 minutes on a page I wrote I recieve the
following error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Validation of viewstate MAC failed. If this application is hosted by a Web
Farm or cluster, ensure that <machineKeyconfiguration specifies the same
validationKey and validation algorithm. AutoGenerate cannot be used in a
cluster.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Validation of viewstate MAC
failed. If this application is hosted by a Web Farm or cluster, ensure that
<machineKeyconfiguration specifies the same validationKey and validation
algorithm. AutoGenerate cannot be used in a cluster.

Source Error:

The source code that generated this unhandled exception can only be
shown when compiled in debug mode. To enable this, please follow one of the
below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated
the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your
application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given
application to be compiled in debug mode. The first technique will cause
only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a
memory/performance overhead. You should make sure that an application has
debugging disabled before deploying into production scenario.

Stack Trace:

[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.GetDeco dedData(Byte[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2549692
System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +214

[ViewStateException: Invalid viewstate.
Client IP: 72.81.21.124
Port: 50536
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
ViewState:
/wEPDwULLTE4MzE4MzkwNDgPZBYCAgMPZBYSAgEPDxYCHgRUZXh 0BSVDb21wbGV4IENhc2UgSGlnaGxpZ2h0IChJdGVtcyAx4oCTM TApZGQCBA8PFgIfAAW7A0EgMzUteWVhci1vbGQgQWZyaWNhbi1 BbWVyaWNhbiBtYW4gcHJlc2VudHMgdG8geW91IGZvciBoaXMgY W5udWFsIOKAnHBoeXNpY2FsIGV4YW0u4oCdIEhlIGhhcyBubyB zaWduaWZpY2FudCBjb21wbGFpbnRzIGJ1dCBpcyBjb25jZXJuZ WQgYmVjYXVzZSBoaXMgb2xkZXIgc2lzdGVyIHdhcyBqdXN0IGR pYWdub3NlZCB3aXRoIHR5cGUgMiBkaWFiZXRlcy4gSGlzIGZhd GhlciBhbHNvIGhhZCB0eXBlIDIgZGlhYmV0ZXMgYW5kIGRpZWQ gYXQgYWdlIDU0IG9mIGEgbXlvY2FyZGlhbCBpbmZhcmN0aW9uL iBIZSBoYXMgdHdvIHNvbnMgYWdlIDEwIGFuZCAxMiwgYm90aCA +MTIwJSBvZiBpZGVhbCB3ZWlnaHQgZm9yIHRoZWlyIGhlaWdod C4gSGUgaXMgNuKAmTDigJ0gYW5kIHdlaWdocyAyMTAgbGJzICh CTUkgMjcga2cvbTIpOyBibG9vZCBwcmVzc3VyZSBpcyAxMzgvO DggbW0gSGcuZGQCBw8PFgIfAAU0Q3VycmVudCBsYWIgcmVzdWx 0cyBmb3IgdGhpcyBwYXRpZW50IGFyZSBhcyBmb2xsb3dzOmRkA goPDxYIHghJbWFnZVVybAUSaW1hZ2VzL01...]

[HttpException (0x80004005): Validation of viewstate MAC failed. If this
application is hosted by a Web Farm or cluster, ensure that <machineKey>
configuration specifies the same validationKey and validation algorithm.
AutoGenerate cannot be used in a cluster.]
System.Web.UI.ViewStateException.ThrowError(Except ion inner, String
persistedState, String errorPageMessage, Boolean macValidationError) +116
System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +251
System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter.Deserialize(String
serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFor matter formatter,
String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6953
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) +154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) +29
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute()
+154
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210
I have no idea why this happens, and am unfamiliar with viewstate MAC. Can
anyone give me a starting point? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Jul 31 '07 #1
1 1781
One chance is that the application is shut down due to no activity, which
would make it regenerate the machine keys (in case you haven't specified
them in web.config) and when keys have changed validating viewstate etc
cannot succeed.
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:O2**************@TK2MSFTNGP06.phx.gbl...
When I click after about 15 minutes on a page I wrote I recieve the
following error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Validation of viewstate MAC failed. If this application is hosted by a Web
Farm or cluster, ensure that <machineKeyconfiguration specifies the same
validationKey and validation algorithm. AutoGenerate cannot be used in a
cluster.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Validation of viewstate MAC
failed. If this application is hosted by a Web Farm or cluster, ensure
that <machineKeyconfiguration specifies the same validationKey and
validation algorithm. AutoGenerate cannot be used in a cluster.

Source Error:

The source code that generated this unhandled exception can only be
shown when compiled in debug mode. To enable this, please follow one of
the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated
the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your
application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given
application to be compiled in debug mode. The first technique will cause
only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a
memory/performance overhead. You should make sure that an application has
debugging disabled before deploying into production scenario.

Stack Trace:

[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.GetDeco dedData(Byte[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2549692
System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +214

[ViewStateException: Invalid viewstate.
Client IP: 72.81.21.124
Port: 50536
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
ViewState:
/wEPDwULLTE4MzE4MzkwNDgPZBYCAgMPZBYSAgEPDxYCHgRUZXh 0BSVDb21wbGV4IENhc2UgSGlnaGxpZ2h0IChJdGVtcyAx4oCTM TApZGQCBA8PFgIfAAW7A0EgMzUteWVhci1vbGQgQWZyaWNhbi1 BbWVyaWNhbiBtYW4gcHJlc2VudHMgdG8geW91IGZvciBoaXMgY W5udWFsIOKAnHBoeXNpY2FsIGV4YW0u4oCdIEhlIGhhcyBubyB zaWduaWZpY2FudCBjb21wbGFpbnRzIGJ1dCBpcyBjb25jZXJuZ WQgYmVjYXVzZSBoaXMgb2xkZXIgc2lzdGVyIHdhcyBqdXN0IGR pYWdub3NlZCB3aXRoIHR5cGUgMiBkaWFiZXRlcy4gSGlzIGZhd GhlciBhbHNvIGhhZCB0eXBlIDIgZGlhYmV0ZXMgYW5kIGRpZWQ gYXQgYWdlIDU0IG9mIGEgbXlvY2FyZGlhbCBpbmZhcmN0aW9uL iBIZSBoYXMgdHdvIHNvbnMgYWdlIDEwIGFuZCAxMiwgYm90aCA +MTIwJSBvZiBpZGVhbCB3ZWlnaHQgZm9yIHRoZWlyIGhlaWdod C4gSGUgaXMgNuKAmTDigJ0gYW5kIHdlaWdocyAyMTAgbGJzICh CTUkgMjcga2cvbTIpOyBibG9vZCBwcmVzc3VyZSBpcyAxMzgvO DggbW0gSGcuZGQCBw8PFgIfAAU0Q3VycmVudCBsYWIgcmVzdWx 0cyBmb3IgdGhpcyBwYXRpZW50IGFyZSBhcyBmb2xsb3dzOmRkA goPDxYIHghJbWFnZVVybAUSaW1hZ2VzL01...]

[HttpException (0x80004005): Validation of viewstate MAC failed. If this
application is hosted by a Web Farm or cluster, ensure that <machineKey>
configuration specifies the same validationKey and validation algorithm.
AutoGenerate cannot be used in a cluster.]
System.Web.UI.ViewStateException.ThrowError(Except ion inner, String
persistedState, String errorPageMessage, Boolean macValidationError) +116
System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +251

System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter.Deserialize(String
serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFor matter formatter,
String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6953
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) +154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) +29

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute()
+154
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.210
I have no idea why this happens, and am unfamiliar with viewstate MAC. Can
anyone give me a starting point? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Aug 1 '07 #2

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

Similar topics

5
by: K. Shier | last post by:
when attempting to edit code in a class file, i see the bug "Visual Basic ..NET compiler is unable to recover from the following error: System Error &Hc0000005&(Visual Basic internal compiler...
3
by: Ian Bailey | last post by:
I have an Access 2000 database running on a network in a Citrix environment. The problem I am experiencing is that some users (not all) get the above error message occasionally, sometimes just...
3
by: Paul | last post by:
I have an Access 2000 database with a form that is giving me some major headaches. When you open the form, it displays all records and allows editing, but has AllowAdditions set to False so that...
16
by: Paul S. Natanson | last post by:
What is a Null Reference error and how do I fix it? My newly installed VB.Net2003 gives me a "Microsoft Development Environment" error message box EVERY time I try to run/start ANY project -...
2
by: Oenone | last post by:
I'm having a couple of problems with the IsDate function in VB.net (.net framework v1.1). Having searched the web and usenet for others having the same problem, I've seen several posts from people...
11
by: MLH | last post by:
Private Sub ButtonP_Click() On Error GoTo Err_ButtonP_Click Dim ThisForm As String ThisForm = Me.Name Exit_ButtonP_Click: Exit Sub Err_ButtonP_Click: Dim r As String, k As String, Message3...
5
by: Alex A. | last post by:
I have this web application that runs for about 5 minutes doing to database processing, about 50% of the time I get the error message Thread was being aborted. I am looking for hint at where to...
0
by: sbhandary | last post by:
Hi, I have an ASP.net page that takes over an hour and sometimes more to execute. After the page has been running for 60 minutes, I get a Page Cannot Be Displayed error. I have set the session...
0
by: =?Utf-8?B?RnV0cm9uaWNzIERldmVsb3Blcg==?= | last post by:
I'm new to the WCF and am having a few problems. NOTE: This post is quite long as I have included some exceptions and other details relating to my findings (which are probebly unessersary!). I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.