Home > Archive > ASP .NET > December 2006 > Viewstate Error in Production Server (IIS 6.0/ASP.NET)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Viewstate Error in Production Server (IIS 6.0/ASP.NET)
|
|
| Nishant 2006-12-20, 7:08 pm |
| Hi all,
We are facing a strange problem in our production environment. We are
running an ASP.NET web application under IIS 6.0 with Windows Server
2003 64-bit (There are 2 CPUs). The users are frequently getting an
"Invalid_Viewstate" error. The error description is "Unable to validate
data".
The exception is "System.Web.HttpException: Authentication of viewstate
failed"
Can anyone help?
-- Nishant
| |
| Peter Bromberg [C# MVP] 2006-12-20, 7:08 pm |
| It's possible because of the 2 cpu situation and how your app is configured
that a WebGarden type of situation is occuring.
The key things here:
Your machineKey element should never be "Autogenerate". Make specific
encryption and decryption keys and place those in the element.
web.config for all sites should have the identical machineKey element.
Failing that, there are several directives that you can place in the <pages>
element to turn off ViewState vaidation and hashing.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Nishant" wrote:
> Hi all,
> We are facing a strange problem in our production environment. We are
> running an ASP.NET web application under IIS 6.0 with Windows Server
> 2003 64-bit (There are 2 CPUs). The users are frequently getting an
> "Invalid_Viewstate" error. The error description is "Unable to validate
> data".
> The exception is "System.Web.HttpException: Authentication of viewstate
> failed"
>
> Can anyone help?
>
> -- Nishant
>
>
| |
| Nishant 2006-12-21, 8:07 am |
| Thanks Peter,
I already implemented, what ever you have suggested. I found another
problem in machine.config file ViewStateMac and validateRequest
attributes was enabled which should be by default disabled, so, I
dissabled it and no body has reported that error once again.
Nishant
Peter wrote:[color=darkred]
> It's possible because of the 2 cpu situation and how your app is configured
> that a WebGarden type of situation is occuring.
> The key things here:
> Your machineKey element should never be "Autogenerate". Make specific
> encryption and decryption keys and place those in the element.
>
> web.config for all sites should have the identical machineKey element.
>
> Failing that, there are several directives that you can place in the <pages>
> element to turn off ViewState vaidation and hashing.
>
> Peter
>
> --
> Co-founder, Eggheadcafe.com developer portal:
> http://www.eggheadcafe.com
> UnBlog:
> http://petesbloggerama.blogspot.com
>
>
>
>
> "Nishant" wrote:
>
|
|
|
|
|