Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
i have created an application and this application is deployed on farm-server where load
balancing is enabled and sticky session is also used.

when request come from single server in that time its working fine but during the post back if request server is changed in
that time it throws an exception "Key not valid for use in specified state".

i have tried to set same machine key on both server but still facing same problem.

my working enviornment is 3.5,IIS 7.0 and Active Directory
Please any one can suggest me ?

thanks in Advance.
Updated 3-Jun-11 2:45am

1 solution

ASP.NET runs a message authentication check (MAC) on the view state of the page when the page is posted back from the client. This check determines if the view state of the page was modified on the client. For security purposes, it is recommended that you keep this attribute set to true.

For configuring the Machine Keys properly you can refer to:
How To: Configure MachineKey in ASP.NET 2.0[^]

Hope it helps.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900