Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Validation of viewstate MAC failed

Posted on 2011-03-02
11
Medium Priority
?
904 Views
Last Modified: 2012-06-21
Hi,

this error is making me crazy:

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.

I have tried the work around like enableViewState="false" viewStateEncryptionMode="Never", even i did not use the DataKeyNames property of the ListView.

I am having Asp.Net 3.5 and working in C# and getting this error in LIVE environment.

Please suggest any proven/used method to sort out this issue.

Thanks
Kaushal Arora
0
Comment
Question by:Kaushal Arora
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35015799
Is you app actually running in a cluster/farm environment?
0
 
LVL 12

Author Comment

by:Kaushal Arora
ID: 35016046
No It is not running in a cluster/farm environment. I am having a dedicated server for the application.
0
 
LVL 1

Expert Comment

by:designweboxx
ID: 35016131
Does this error only happen in IE or other Browsers as well?

I had this issue when I used jQuery to update some areas inside a web form by AJAX (only in IE, all other Browsers worked fine). Moving the AJAX-modified areas out of the <form runat=server>-tag solved the problem. Not the best solution, but in my case it worked.

Still looking for a more elegant solution though...
0
Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

 
LVL 12

Author Comment

by:Kaushal Arora
ID: 35016332
I am getting this error in all the browsers, not only in IE.
Also the error is coming on both type of pages that is where AJAX toolkit is used and where it is not.

0
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 35146577
try to add this string in <system.web> section of your web.config file :
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" />
for fix "Validation of viewstate MAC failed" error.


also see this

http://forums.asp.net/t/955145.aspx?PageIndex=20
0
 
LVL 12

Author Comment

by:Kaushal Arora
ID: 35146672
@king2002: I have already tried these things.

One thing more which i have observed is that mainly this error comes when my page is idle for some time and user click on any link.
0
 
LVL 16

Accepted Solution

by:
Kamal Khaleefa earned 2000 total points
ID: 35146813
The reason for this error is validation of Viewstate failing because of different value of key for encryption/decryption across different server on farm. Below link provide good explanation of this error and possible resolution for the same.
http://a2zmenu.com/AspNet/Validation-of-viewstate-MAC-failed.aspx
0
 
LVL 12

Author Comment

by:Kaushal Arora
ID: 35147548
I will test the second method given in the link and will revert you soon.

Thanks for the help.
0
 
LVL 12

Author Closing Comment

by:Kaushal Arora
ID: 35163821
Thanks
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

609 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