By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,573 Members | 903 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,573 IT Pros & Developers. It's quick & easy.

Unable to validate data after idle

P: n/a
Im developing an ASP.NET application used for maintinance purpose and
it may be idle for some ours. The application crash with the error
shown below when the user click on some contol in the appliaction.
This crash occurs on every clients at same time, event for the client
at the local server. I added some logging to the Application_Error
method that contains following:
Exception of type System.Web.HttpUnhandledException was thrown.
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)

We have deployed the application on a lot of plats without any problem
so it seems that we have some problem with the setting for the IIS.
The IIS is windows standard compinent in Windows server 2003. Note
that we using .Net framework 1.1 and the serve also have .NET
framework 2.0 installed.

Information from the Webclient:

Unable to validate data.
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: Unable to validate data.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace
below.

Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +196
System.Web.UI.LosFormatter.Deserialize(String input) +60

[HttpException (0x80004005): Authentication of viewstate failed. 1)
If this is a cluster, edit <machineKeyconfiguration 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.UI.LosFormatter.Deserialize(String input) +118
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +102

[HttpException (0x80004005): Inval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pjaGtNTUM7Q3RybElkX1Bvc2l0aW9uRGF0YTpjaGtQb GM7Q3RybElkX1Bvc2l0aW9uRGF0YTpjaGtVcGRhdGVUcnVuOz4 +/
U9vGHqMxtg5HH83KjI8tR+iw9c=
Http-Referer: http://localhost/Default.aspx
Path: /Default.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +448
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +447

/Stefan S

Mar 20 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"Solje" <st************@hotmail.comwrote in message
news:11**********************@n76g2000hsh.googlegr oups.com...
Im developing an ASP.NET application used for maintinance purpose and
it may be idle for some ours.
<snip>

Is it not simply that the clients' Session has timed out...?

Easy enough to code round this by interrogating the IsNewSession property of
the HttpSessionState object:
http://www.google.co.uk/search?hl=en...rt+Excel&meta=

I almost always construct a base page which has this check built into it and
then inherit all subsequent pages from that instead of the default Page
object...
Mar 20 '07 #2

P: n/a
Thank you for answer.

But why should this happen at same time for every clients?

I think it seems that the server loosed some inormation about the
viewstate or something.

/Stefan

Mar 20 '07 #3

P: n/a
"Solje" <st************@hotmail.comwrote in message
news:11**********************@d57g2000hsg.googlegr oups.com...
But why should this happen at same time for every clients?
Maybe your web app recycled...? Are there any entries in the web server's
Event Log which would confirm this...?
Mar 20 '07 #4

P: n/a
On 20 Mar, 12:51, "Mark Rae" <m...@markNOSPAMrae.comwrote:
"Solje" <stefan.solj...@hotmail.comwrote in message

news:11**********************@n76g2000hsh.googlegr oups.com...
Im developing anASP.NET application used for maintinance purpose and
it may be idle for some ours.

<snip>

Is it not simply that the clients' Session has timed out...?

Easy enough to code round this by interrogating the IsNewSession property of
the HttpSessionState object:http://www.google.co.uk/search?hl=en...2006-28%2CGGLG...

I almost always construct a base page which has this check built into it and
then inherit all subsequent pages from that instead of the default Page
object...
Hello again!

The link seems to point to some excel stuff. Is that correct?

/Stefan

Mar 20 '07 #5

P: n/a
"Solje" <st************@hotmail.comwrote in message
news:11*********************@d57g2000hsg.googlegro ups.com...
The link seems to point to some excel stuff. Is that correct?
My apologies...
http://www.google.co.uk/search?hl=en...wSession&meta=
Mar 20 '07 #6

P: n/a
by default the viewstate is encrypted. the key is autogenerated when the
appdomain starts up. it appers in your case when the app domain is
recycled (after idle time) a new key is generated (maybe you have more
than 1 nic on the server and a different mac address is picked). you can
set the machineKey in the web config to prevent this.

-- bruce (sqlwork.com)

Solje wrote:
Im developing an ASP.NET application used for maintinance purpose and
it may be idle for some ours. The application crash with the error
shown below when the user click on some contol in the appliaction.
This crash occurs on every clients at same time, event for the client
at the local server. I added some logging to the Application_Error
method that contains following:
Exception of type System.Web.HttpUnhandledException was thrown.
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)

We have deployed the application on a lot of plats without any problem
so it seems that we have some problem with the setting for the IIS.
The IIS is windows standard compinent in Windows server 2003. Note
that we using .Net framework 1.1 and the serve also have .NET
framework 2.0 installed.

Information from the Webclient:

Unable to validate data.
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: Unable to validate data.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace
below.

Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +196
System.Web.UI.LosFormatter.Deserialize(String input) +60

[HttpException (0x80004005): Authentication of viewstate failed. 1)
If this is a cluster, edit <machineKeyconfiguration 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.UI.LosFormatter.Deserialize(String input) +118
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +102

[HttpException (0x80004005): Invalid_Viewstate
Client IP: 127.0.0.1
Port: 4160
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET
CLR 1.1.4322; .NET CLR 2.0.50727)
ViewState: dDwxMDkyNjEwOTE4O3Q8cDxsPEN0cmxJZDs
+O2w8UG9zaXRpb25EYXRhOz4+O2w8aTwxPjs+O2w8dDw7bDxpP DM
+Oz47bDx0PHA8cDxsPENzc0NsYXNzO18hU0I7PjtsPG1haW5UY WJsZTtpPDI
+Oz4+Oz47bDxpPDA+O2k8MT47PjtsPHQ8O2w8aTwwPjs+O2w8d Dw7bDxpPDA
+Oz47bDx0PDtsPGk8MD47aTwyPjs
+O2w8dDxwPHA8bDxDc3NDbGFzcztfIVNCOz47bDx0YWJUYWJsZ TtpPDI
+Oz4+Oz47Oz47dDxwPHA8bDxDc3NDbGFzcztfIVNCOz47bDx0Y WJTdWJUYWJsZTtpPDI
+Oz4+Oz47Oz47Pj47Pj47Pj47dDw7bDxpPDA
+Oz47bDx0PDtsPGk8MD47PjtsPHQ8O2w8aTwxPjtpPDM
+Oz47bDx0PDtsPGk8MT47aTwzPjtpPDU
+O2k8OT47aTwxMT47aTwxNT47aTwxNz47PjtsPHQ8cDxwPGw8V GV4dDs
+O2w8Wm9uOz4+Oz47Oz47dDx0PDt0PGk8MTM
+O0A8Q2hvb3NlIFpvbmU7TWFza2UgMSBQbG9ja3N0YXRpb24gM TtNYXNrZSAxIFBsb2Nrc3RhdGlvbiAyO01hc2tlIDIgUGxvY2t zdGF0aW9uIDM7TWFza2UgMiBQbG9ja3N0YXRpb24gNDtNYXNrZ SAzIElEIFN0YXRpb24gMTtNYXNrZSAzIElEIFN0YXRpb24gMjt NYXNrZSAzIElEIFN0YXRpb24gMztNYXNrZSA0IEtyYW4gMS0yO 01hc2tl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EN0cmxJZF9Qb3NpdGlvbkRhdGE6YnV0UHJldjtDdHJsS WRfUG9zaXRpb25EYXRhOmJ1dE5leHQ7Q3RybElkX1Bvc2l0aW9 uRGF0YTpjaGtNTUM7Q3RybElkX1Bvc2l0aW9uRGF0YTpjaGtQb GM7Q3RybElkX1Bvc2l0aW9uRGF0YTpjaGtVcGRhdGVUcnVuOz4 +/
U9vGHqMxtg5HH83KjI8tR+iw9c=
Http-Referer: http://localhost/Default.aspx
Path: /Default.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +448
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +447

/Stefan S
Mar 20 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.