Solved

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

Posted on 2008-10-08
4
2,389 Views
Last Modified: 2012-08-13
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.
0
Comment
Question by:ShaileshShinde
4 Comments
 
LVL 27

Expert Comment

by:Sammy
ID: 22670488
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



0
 
LVL 1

Author Comment

by:ShaileshShinde
ID: 22684600
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.
0
 
LVL 1

Accepted Solution

by:
AugustReign earned 500 total points
ID: 22754721
Try adding enableViewStateMac="false" to the <pages> tag in your web.config as well.  For example:
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" enableViewStateMac="false">

Open in new window

0
 
LVL 1

Expert Comment

by:code4food
ID: 22854171
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!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now