S
sjl
I've got an .aspx webform for searching my database. It basically takes user
input and passes it as a parm into a stored proc to search a table. The
results are returned in a SQLDataReader and bound to a datagrid on the same
page. It works 90% of the time as expected. However, for some unknown
reason, I randomly get the error below. The HttpException says there is an
'Invalid_Viewstate'. Ok, but why? I'm posting back to the same page. If the
Viewstate is corrupt, then why?
I'm hosting at Orcs Web using shared hosting, ASP.NET 1.1, SQL 2000, VS2003.
***********ERROR MESSAGE DETAILS******************
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.
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: xxxxxx
Port: 3639
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322; .NET CLR 2.0.50215)
ViewState: dDwtMTUxMTMzMDAzMjt0 [clipped]
Http-Referer: http://xxxxxxxxxx/search.aspx
Path: /search.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +443
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +447
***********ERROR MESSAGE DETAILS******************
Thanks for any help you can provide.
SJL
input and passes it as a parm into a stored proc to search a table. The
results are returned in a SQLDataReader and bound to a datagrid on the same
page. It works 90% of the time as expected. However, for some unknown
reason, I randomly get the error below. The HttpException says there is an
'Invalid_Viewstate'. Ok, but why? I'm posting back to the same page. If the
Viewstate is corrupt, then why?
I'm hosting at Orcs Web using shared hosting, ASP.NET 1.1, SQL 2000, VS2003.
***********ERROR MESSAGE DETAILS******************
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.
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: xxxxxx
Port: 3639
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322; .NET CLR 2.0.50215)
ViewState: dDwtMTUxMTMzMDAzMjt0 [clipped]
Http-Referer: http://xxxxxxxxxx/search.aspx
Path: /search.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +443
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +447
***********ERROR MESSAGE DETAILS******************
Thanks for any help you can provide.
SJL