473,750 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 <machineKeyconf iguration 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.Http Exception: Validation of viewstate MAC
failed. If this application is hosted by a Web Farm or cluster, ensure that
<machineKeyconf iguration 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:

<configuratio n>
<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.Conf iguration.Machi neKeySection.Ge tDecodedData(By te[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2549692
System.Web.UI.O bjectStateForma tter.Deserializ e(String inputString) +214

[ViewStateExcept ion: 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:
/wEPDwULLTE4MzE4 MzkwNDgPZBYCAgM PZBYSAgEPDxYCHg RUZXh0BSVDb21wb GV4IENhc2UgSGln aGxpZ2h0IChJdGV tcyAx4oCTMTApZG QCBA8PFgIfAAW7A 0EgMzUteWVhci1v bGQgQWZyaWNhbi1 BbWVyaWNhbiBtYW 4gcHJlc2VudHMgd G8geW91IGZvciBo aXMgYW5udWFsIOK AnHBoeXNpY2FsIG V4YW0u4oCdIEhlI GhhcyBubyBzaWdu aWZpY2FudCBjb21 wbGFpbnRzIGJ1dC BpcyBjb25jZXJuZ WQgYmVjYXVzZSBo aXMgb2xkZXIgc2l zdGVyIHdhcyBqdX N0IGRpYWdub3NlZ CB3aXRoIHR5cGUg MiBkaWFiZXRlcy4 gSGlzIGZhdGhlci BhbHNvIGhhZCB0e XBlIDIgZGlhYmV0 ZXMgYW5kIGRpZWQ gYXQgYWdlIDU0IG 9mIGEgbXlvY2FyZ GlhbCBpbmZhcmN0 aW9uLiBIZSBoYXM gdHdvIHNvbnMgYW dlIDEwIGFuZCAxM iwgYm90aCA+MTIw JSBvZiBpZGVhbCB 3ZWlnaHQgZm9yIH RoZWlyIGhlaWdod C4gSGUgaXMgNuKA mTDigJ0gYW5kIHd laWdocyAyMTAgbG JzIChCTUkgMjcga 2cvbTIpOyBibG9v ZCBwcmVzc3VyZSB pcyAxMzgvODggbW 0gSGcuZGQCBw8PF gIfAAU0Q3VycmVu dCBsYWIgcmVzdWx 0cyBmb3IgdGhpcy BwYXRpZW50IGFyZ SBhcyBmb2xsb3dz OmRkAgoPDxYIHgh JbWFnZVVybAUSaW 1hZ2VzL01...]

[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.V iewStateExcepti on.ThrowError(E xception inner, String
persistedState, String errorPageMessag e, Boolean macValidationEr ror) +116
System.Web.UI.O bjectStateForma tter.Deserializ e(String inputString) +251
System.Web.UI.O bjectStateForma tter.System.Web .UI.IStateForma tter.Deserializ e(String
serializedState ) +4
System.Web.UI.U til.Deserialize WithAssert(ISta teFormatter formatter,
String serializedState ) +37
System.Web.UI.H iddenFieldPageS tatePersister.L oad() +220
System.Web.UI.P age.LoadPageSta teFromPersisten ceMedium() +83
System.Web.UI.P age.LoadAllStat e() +35
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +6953
System.Web.UI.P age.ProcessRequ est(Boolean includeStagesBe foreAsyncPoint,
Boolean includeStagesAf terAsyncPoint) +154
System.Web.UI.P age.ProcessRequ est() +86
System.Web.UI.P age.ProcessRequ estWithNoAssert (HttpContext context) +18
System.Web.UI.P age.ProcessRequ est(HttpContext context) +49
ASP.default_asp x.ProcessReques t(HttpContext context) +29
System.Web.Call HandlerExecutio nStep.System.We b.HttpApplicati on.IExecutionSt ep.Execute()
+154
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +64

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET
Version:2.0.507 27.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********@hotm ail.com
http://www.nathansokalski.com/
Jul 31 '07 #1
1 1805
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********@hot mail.comwrote in message
news:O2******** ******@TK2MSFTN GP06.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 <machineKeyconf iguration 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.Http Exception: Validation of viewstate MAC
failed. If this application is hosted by a Web Farm or cluster, ensure
that <machineKeyconf iguration 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:

<configuratio n>
<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.Conf iguration.Machi neKeySection.Ge tDecodedData(By te[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2549692
System.Web.UI.O bjectStateForma tter.Deserializ e(String inputString) +214

[ViewStateExcept ion: 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:
/wEPDwULLTE4MzE4 MzkwNDgPZBYCAgM PZBYSAgEPDxYCHg RUZXh0BSVDb21wb GV4IENhc2UgSGln aGxpZ2h0IChJdGV tcyAx4oCTMTApZG QCBA8PFgIfAAW7A 0EgMzUteWVhci1v bGQgQWZyaWNhbi1 BbWVyaWNhbiBtYW 4gcHJlc2VudHMgd G8geW91IGZvciBo aXMgYW5udWFsIOK AnHBoeXNpY2FsIG V4YW0u4oCdIEhlI GhhcyBubyBzaWdu aWZpY2FudCBjb21 wbGFpbnRzIGJ1dC BpcyBjb25jZXJuZ WQgYmVjYXVzZSBo aXMgb2xkZXIgc2l zdGVyIHdhcyBqdX N0IGRpYWdub3NlZ CB3aXRoIHR5cGUg MiBkaWFiZXRlcy4 gSGlzIGZhdGhlci BhbHNvIGhhZCB0e XBlIDIgZGlhYmV0 ZXMgYW5kIGRpZWQ gYXQgYWdlIDU0IG 9mIGEgbXlvY2FyZ GlhbCBpbmZhcmN0 aW9uLiBIZSBoYXM gdHdvIHNvbnMgYW dlIDEwIGFuZCAxM iwgYm90aCA+MTIw JSBvZiBpZGVhbCB 3ZWlnaHQgZm9yIH RoZWlyIGhlaWdod C4gSGUgaXMgNuKA mTDigJ0gYW5kIHd laWdocyAyMTAgbG JzIChCTUkgMjcga 2cvbTIpOyBibG9v ZCBwcmVzc3VyZSB pcyAxMzgvODggbW 0gSGcuZGQCBw8PF gIfAAU0Q3VycmVu dCBsYWIgcmVzdWx 0cyBmb3IgdGhpcy BwYXRpZW50IGFyZ SBhcyBmb2xsb3dz OmRkAgoPDxYIHgh JbWFnZVVybAUSaW 1hZ2VzL01...]

[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.V iewStateExcepti on.ThrowError(E xception inner, String
persistedState, String errorPageMessag e, Boolean macValidationEr ror) +116
System.Web.UI.O bjectStateForma tter.Deserializ e(String inputString) +251

System.Web.UI.O bjectStateForma tter.System.Web .UI.IStateForma tter.Deserializ e(String
serializedState ) +4
System.Web.UI.U til.Deserialize WithAssert(ISta teFormatter formatter,
String serializedState ) +37
System.Web.UI.H iddenFieldPageS tatePersister.L oad() +220
System.Web.UI.P age.LoadPageSta teFromPersisten ceMedium() +83
System.Web.UI.P age.LoadAllStat e() +35
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +6953
System.Web.UI.P age.ProcessRequ est(Boolean includeStagesBe foreAsyncPoint,
Boolean includeStagesAf terAsyncPoint) +154
System.Web.UI.P age.ProcessRequ est() +86
System.Web.UI.P age.ProcessRequ estWithNoAssert (HttpContext context) +18
System.Web.UI.P age.ProcessRequ est(HttpContext context) +49
ASP.default_asp x.ProcessReques t(HttpContext context) +29

System.Web.Call HandlerExecutio nStep.System.We b.HttpApplicati on.IExecutionSt ep.Execute()
+154
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +64

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.42;
ASP.NET Version:2.0.507 27.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********@hotm ail.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
7235
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 error) Save your work and restart Visual Studio .NET." has anyone seen this bug and can you confirm one way or the other whether or not it can corrupt your source files? (by 'corrupt' i mean: do anything to it that will cause it to fail to load and...
3
13261
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 once or twice a day, sometimes many times. It seems to revolve around two forms that are kept open most of the day. Form A has a list of tasks to be done by that user. This form requeries it's recordsource on the timer event once every ten...
3
4620
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 the user has to use my New Record button. When you click the New Record button, the form presents a new record for editing. My client wants to use the Escape key to cancel changes to new or existing records. On existing records, Access already...
16
2307
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 - even very simple ones. The error says: "An unhandled exception of type 'System.NullReferenceException' occurred in
2
4465
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 reporting the same error as me, followed by various responses from others saying they can't recreate the problem. Well I think I know how to recreate it, but I still don't understand why it's occurring. Does anyone have any ideas? Try the...
11
4229
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 As String
5
5239
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 look, I've been banging my head on this issue for a couple of months (when I have time to bang my head on this). Here's some information on my app:
0
1231
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 timeout to 40 minutes and have the following java script to send mesg to server just to prevent timeout from occuring. <script type="text/javascript" language="javascript"> function Reconnect(){ var img = new Image(1,1);
0
3026
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 have a very simple client - server application using the WCF. There is one method on the server that accepts an object as an argument. The client calls this method fairly regularly (lets say every 10 seconds for arguments sake), sending objects...
0
8999
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9575
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9394
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8260
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6803
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.