L
Logician
Question
Does the server need a patch or do I need to change the config file?
Problem
My system is dogged by the viewstate error which happens after the page
is left inactive for about 10 mins. If I close and re-open it works
normally, but sometimes needs two re-opens.
It happens on all my aspx code, but my code is very simple. One example
is the shopping cart, which just updates a basket and displays a grid.
There is no session id, no checking, and no user input.
See http://www.merrows.co.uk/accounts/cart.aspx for the cart.
I use IE under Win XP (pro).
I think this is something connnected with timeout as after 10 mins it
happens, and I read somewhere that 10 mins was a timeout period by
default for a session.
I do need viewstates.
I am not using Farms, I rent a dedicated Windows server from
hostway.com. Several end users complain it does not work. I have
searched the Web and found the normal viewstate and farm reasons.
I use the defaults for config:
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Example Dump
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 <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.UI.LosFormatter.Deserialize(String input) +118
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
[HttpException (0x80004005): Invalid_Viewstate
Client IP: 82.34.178.148
Port: 2717
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
..NET
CLR 1.1.4322; Alexa Toolbar)
ViewState:
dDwtMTg2MzMxODYxMzt0PDtsPGk8MT47PjtsPHQ8O2w8aTwyMT47PjtsPHQ8dDw7dDxp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yBBbmltYWxzO1RveXMgUm9sbHk7PjtAPDE7Mzs0OzU7Njs3Ozg7MjQ7OTsyOzEwOzUxOzExOzIzOzEyOzEzOzU4OzI1OzE0OzE1OzE2OzU2OzE3OzM1OzE4OzU5OzUzOzE5OzIwOzIxOzIyOzMzOzUwOzQ3OzQwOzQ2OzMwOzMxOzQxOzMyOzQ4OzI3OzI4OzM2OzM0OzI5Oz4+O2w8aTwxOT47Pj47Oz47Pj47Pj47PhXSW+j0QOCokmjqlGc8JWy/Nfri
Http-Referer:
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +448
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +444
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300;
ASP.NET Version:1.1.4322.2300
Does the server need a patch or do I need to change the config file?
Problem
My system is dogged by the viewstate error which happens after the page
is left inactive for about 10 mins. If I close and re-open it works
normally, but sometimes needs two re-opens.
It happens on all my aspx code, but my code is very simple. One example
is the shopping cart, which just updates a basket and displays a grid.
There is no session id, no checking, and no user input.
See http://www.merrows.co.uk/accounts/cart.aspx for the cart.
I use IE under Win XP (pro).
I think this is something connnected with timeout as after 10 mins it
happens, and I read somewhere that 10 mins was a timeout period by
default for a session.
I do need viewstates.
I am not using Farms, I rent a dedicated Windows server from
hostway.com. Several end users complain it does not work. I have
searched the Web and found the normal viewstate and farm reasons.
I use the defaults for config:
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Example Dump
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 <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.UI.LosFormatter.Deserialize(String input) +118
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
[HttpException (0x80004005): Invalid_Viewstate
Client IP: 82.34.178.148
Port: 2717
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
..NET
CLR 1.1.4322; Alexa Toolbar)
ViewState:
dDwtMTg2MzMxODYxMzt0PDtsPGk8MT47PjtsPHQ8O2w8aTwyMT47PjtsPHQ8dDw7dDxpPDQ2PjtAPEJhdGhyb29tcyBBZXN0dXM7QmF0aHJvb21zIEFtYmVyO0JhdGhyb29tcyBBcXVhbGlzYTtCYXRocm9vbXMgQmFyYmVyIFdpbHNvbnM7QmF0aHJvb21zIEJDIERlc2lnbnM7QmF0aHJvb21zIEJyaXN0YW47QmF0aHJvb21zIENsZWFyd2F0ZXI7QmF0aHJvb21zIENyb3Nzd2F0ZXI7QmF0aHJvb21zIERldmE7QmF0aHJvb21zIEV1cm9iYXRoO0JhdGhyb29tcyBHcm9oZTtCYXRocm9vbXMgSG9sbHlzIG9mIEJhdGg7QmF0aHJvb21zIEh1ZHNvbiBSZWVkO0JhdGhyb29tcyBJZGVhbCBTdGFuZGFyZDtCYXRocm9vbXMgSW1wZXJpYWw7QmF0aHJvb21zIEludGE7QmF0aHJvb21zIEplbmRpY287QmF0aHJvb21zIEthbGRld2VpO0JhdGhyb29tcyBNYXJmbG93O0JhdGhyb29tcyBNSFM7QmF0aHJvb21zIE1pcmE7QmF0aHJvb21zIE1vb2RzO0JhdGhyb29tcyBNeXNvbjtCYXRocm9vbXMgTm9yZGljO0JhdGhyb29tcyBTYW5ldXg7QmF0aHJvb21zIFNhbmlub3ZhO0JhdGhyb29tcyBTdCBKYW1lcztCYXRocm9vbXMgU3R1YXJ0IFR1cm5lcjtCYXRocm9vbXMgU3dhZGxpbmc7QmF0aHJvb21zIFRyZXZpO0JhdGhyb29tcyBWb2d1ZTtCYXRocm9vbXMgVnlzYWw7Q29pbnMgQnJpdGlzaDtEVkRzIEFsIFBhY2lubztEVkRzIEh1bXBocmV5IEJvZ2FydDtEVkRzIEphY2sgTGVtbW9uO0RWRHMgTWluZGVyO0RWRHMgT25seSBGb29scyBhbmQgSG9yc2VzO0RWRHMgUm9iZXJ0IERlIE5pcm87RFZEcyBTaGVybG9jayBIb2xtZXM7S2l0Y2hlbnMgQnJpc3RhbjtSdWdzIENoaW5lc2U7UnVncyBJbmRpYW47UnVncyBNYWNoaW5lIE1hZGU7VG95cyBBbmltYWxzO1RveXMgUm9sbHk7PjtAPDE7Mzs0OzU7Njs3Ozg7MjQ7OTsyOzEwOzUxOzExOzIzOzEyOzEzOzU4OzI1OzE0OzE1OzE2OzU2OzE3OzM1OzE4OzU5OzUzOzE5OzIwOzIxOzIyOzMzOzUwOzQ3OzQwOzQ2OzMwOzMxOzQxOzMyOzQ4OzI3OzI4OzM2OzM0OzI5Oz4+O2w8aTwxOT47Pj47Oz47Pj47Pj47PhXSW+j0QOCokmjqlGc8JWy/Nfri
Http-Referer:
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +448
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +444
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300;
ASP.NET Version:1.1.4322.2300