Array
(
)

Erro de Unable to validate data.

Erivando
   - 25 set 2007

Colegas, não sei porque sempre passa algum tempo e quando clico nos botões aparece o erro abaixo:

Este erro mostrado abaixo veio dos seguinte código em um botão:

procedure TWebForm1.Button1_Click(sender: System.Object; e: System.EventArgs);
begin
if Session[´Usuario´] = nil then
Response.Redirect(´Login.aspx´)
else
Response.Redirect(´Anuncio.aspx´);
end;

Como posso evitar este erro? Amigos, Grato Erivando

Citação:

Server Error in ´/´ Application.
--------------------------------------------------------------------------------

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: 201.12.117.114
Port: 2189
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
ViewState: dDwxNTQ3Nzk1NTEwO3Q8O2w8aTwxPjtpPDM+Oz47bDx0PHA8bDxpbm5lcmh0bWw7PjtsPFBvcHVsYW5kby5jb20uYnIgLSBPIENsYXNzaWZpY2FkbyBtYWlzIFBvcHVsYXIgZGEgSW50ZXJuZXQ7Pj47Oz47dDw7bDxpPDM+O2k8Nz47aTwxOT47aTwyMT47PjtsPHQ8O2w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TwxPjtpPDI+Oz47bDx0PHA8cDxsPFRleHQ7PjtsPFw8aW1nIGhlaWdodD0iMjA
Http-Referer: http://www.populando.com.br/Default.aspx
Path: /Default.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +443
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +447

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407