Link to home
Start Free TrialLog in
Avatar of ShaileshShinde
ShaileshShindeFlag for India

asked on

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenera

Hi,

I am getting the following  error message...I have visual studio 2008 with sp1 and  .net framework 3.5,3.0 and 2.0 also....

I tried to to modify web.config by using
 ViewStateEncryptionMode="Never"
    EnableViewStateMac="false" EnableEventValidation="false" ...

I also add Machine key  tag in web.config still problem is there ........

I have one user control from which a pop up window get opened and when I hit any button or after postback i am getting this errror please help me.............

I am in trouble..........

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Avatar of Sammy
Sammy
Flag of Canada image

Try using the PostBackUrl property instead of the normal postback
this should be done on the user control
Example myButton.PostBackUrl = "mypage.aspx";

post the code the control is using to open the page



Avatar of ShaileshShinde

ASKER

what u r talking about ? i am getting this error

I am getting the following  error message...I have visual studio 2008 with sp1 and  .net framework 3.5,3.0 and 2.0 also....

I tried to to modify web.config by using
 ViewStateEncryptionMode="Never"
    EnableViewStateMac="false" EnableEventValidation="false" ...

I also add Machine key  tag in web.config still problem is there ........

I have one user control from which a pop up window get opened and when I hit any button or after postback i am getting this errror please help me.............

I am in trouble..........

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
ASKER CERTIFIED SOLUTION
Avatar of AugustReign
AugustReign

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of code4food
code4food

AugustReign,
 That did the trick for me! Good going! I am not the author of the original question, but I was looing for an answer to that very same problem and it worked perfectly. Thanks a million!