Fixing the Validation of viewstate MAC failed error issue.

This is just a quickie to see if that helps anybody. The GridView in GeoTwitter had a problem as was using the DataKeyNames. I was getting the error on the viewstate MAC failed error. Looks like adding the code below on the web.config fix the issue.

<pages enableEventValidation="false" viewStateEncryptionMode="Never">

The problem now is I don’t have a validation for the viewstate, that’s a security problem in my modest opinion, I found this resource below that help me to understand a little bit more what the MAC failed error is:

Great blog post found here: Resources to fix the issue.

Hope it helps you too.

Cheers

Al

Published Monday, August 11, 2008 11:09 PM by albertpascual
Filed under: , , ,

Comments

# re: Fixing the Validation of viewstate MAC failed error issue.

Thursday, March 5, 2009 3:30 AM by Prasad

I am Facing The Following Error  Please help me out...

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.

# re: Fixing the Validation of viewstate MAC failed error issue.

Thursday, March 19, 2009 12:41 AM by AK

In web.config add

<pages enableViewStateMac ="false">

Hope this helps..

# re: Fixing the Validation of viewstate MAC failed error issue.

Tuesday, April 21, 2009 2:01 PM by Tim

And we've been arguing for HOW MANY YEARS on all of the highly situational *fixes* on this problem from a plethora of *experts* ... Change the web.config, change the page properties, force a postback URL .... ugh ...

# re: Fixing the Validation of viewstate MAC failed error issue.

Monday, February 8, 2010 6:02 AM by Junaid Ahmed Siddiqui

In web.config add

<pages enableViewStateMac ="false">

It worked I am very grateful to you. Thanks Alot

# re: Fixing the Validation of viewstate MAC failed error issue.

Thursday, August 5, 2010 3:04 AM by Keerthy

Can any one HELP me in GENERATING THE ERROR "Validation of viewstate MAC" please...

# re: Fixing the Validation of viewstate MAC failed error issue.

Friday, October 15, 2010 3:42 PM by tane

sahdyscience´s answer really helped me  with this problem...thanks

# re: Fixing the Validation of viewstate MAC failed error issue.

Thursday, October 28, 2010 7:56 AM by Halby

I am facing the same problem only with one client system. rest everywhere it works fine.

# re: Fixing the Validation of viewstate MAC failed error issue.

Friday, March 4, 2011 2:31 PM by gabernathy

I have the same issue on a page with several updatepanels.  I assume the issue is as described in the referenced link (an updatepanel is posting back before the hidden field is rendered).  I am setting enableViewStateMac="false" to see if it will correct it.

# re: Fixing the Validation of viewstate MAC failed error issue.

Thursday, April 21, 2011 4:44 AM by Huy Tran

thank a lot, it worked ^_^

# re: Fixing the Validation of viewstate MAC failed error issue.

Friday, May 13, 2011 8:13 AM by weblogs.asp.net

Fixing the validation of viewstate mac failed error issue.. Slap-up :)

# re: Fixing the Validation of viewstate MAC failed error issue.

Sunday, May 22, 2011 12:51 AM by Mominul

In web.config add

<pages enableViewStateMac ="false">

It worked I am very grateful to you. Thanks.

# re: Fixing the Validation of viewstate MAC failed error issue.

Monday, June 27, 2011 1:24 PM by weblogs.asp.net

Fixing the validation of viewstate mac failed error issue.. Great idea :)

# re: Fixing the Validation of viewstate MAC failed error issue.

Saturday, September 10, 2011 5:14 AM by balwant

u can run the .net set up it will help and revolve the work

# re: Fixing the Validation of viewstate MAC failed error issue.

Wednesday, September 14, 2011 9:20 PM by linux_nd

Thanks!. It's worked

# re: Fixing the Validation of viewstate MAC failed error issue.

Tuesday, September 20, 2011 2:03 AM by Muthukumar Nadar

<pages enableViewStateMac ="false">

worked for me.

Thanx buddy...

# re: Fixing the Validation of viewstate MAC failed error issue.

Wednesday, November 16, 2011 6:23 AM by mohit

<pages enableViewStateMac ="false">

# re: Fixing the Validation of viewstate MAC failed error issue.

Friday, January 27, 2012 2:14 AM by icmt college

<pages enableViewStateMac ="false">

# re: Fixing the Validation of viewstate MAC failed error issue.

Thursday, April 12, 2012 9:16 AM by rocker

where do we add that line in web.config ?

# re: Fixing the Validation of viewstate MAC failed error issue.

Sunday, May 13, 2012 3:18 PM by tonnyc

The setting should be in the <system.web> section of your wen.config file

# re: Fixing the Validation of viewstate MAC failed error issue.

Monday, September 24, 2012 6:17 PM by Derek Wade

I also found that if an unhandled exception occurs, this causes the work process to reset and then the viewstate is invalid.  check Event Viewer for ASP.NET events.

# re: Fixing the Validation of viewstate MAC failed error issue.

Friday, December 21, 2012 2:00 PM by Bartley

This is really exciting, You’re a tremendously trained article author.

I’ve joined with your feed and also anticipate enjoying that the awesome write-ups.

Incidentally, I’ve got shared the blog throughout our social

networking website pages.

# re: Fixing the Validation of viewstate MAC failed error issue.

Tuesday, January 8, 2013 10:24 AM by Weathers

I admire your piece of work, regards for all that

the interesting posts .

# re: Fixing the Validation of viewstate MAC failed error issue.

Tuesday, January 8, 2013 10:29 AM by Folse

Great blog here! Also your website loads up fast!

What host are you that the usage of? Can I determine your affiliate hyperlink for your

host? I want my website loaded up because quickly as

yours lol.

# re: Fixing the Validation of viewstate MAC failed error issue.

Friday, January 11, 2013 1:06 AM by Fabian

I think your blog is getting more and much more visitors.

~,.*-

# re: Fixing the Validation of viewstate MAC failed error issue.

Monday, January 28, 2013 4:32 AM by Weddle

What's up, after reading this remarkable post i am as well glad to share my know-how here with mates.

# re: Fixing the Validation of viewstate MAC failed error issue.

Tuesday, January 29, 2013 3:07 AM by Hickman

I’m happy I found this weblog, I couldnt uncover any data on this topic matter prior to.

I also run a site and when you want to ever serious in the tiny bit

of guest writing for me if achievable really feel

without charge to let me know, i’m always look for people to

examine out my site. Please stop by and leave a comment sometime!

# re: Fixing the Validation of viewstate MAC failed error issue.

Thursday, January 31, 2013 11:02 PM by Gavin

I used to be able to find good advice from your articles.

# re: Fixing the Validation of viewstate MAC failed error issue.

Friday, February 1, 2013 1:26 AM by Sperry

Hi there, You have done a great job. I will certainly digg it and personally

recommend to my friends. I am sure they'll be benefited from this website.

# re: Fixing the Validation of viewstate MAC failed error issue.

Friday, February 1, 2013 4:49 AM by Houck

Hey, I think your site might be having browser compatibility issues.

When I look at your website in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping.

I just wanted to give you a quick heads up!

Other then that, very good blog!

# re: Fixing the Validation of viewstate MAC failed error issue.

Wednesday, February 13, 2013 9:12 AM by Mcreynolds

I always emailed this webpage post page to all my contacts,

for the reason that if like to read it afterward my links will too.

# re: Fixing the Validation of viewstate MAC failed error issue.

Wednesday, February 13, 2013 11:33 AM by Fry

I'm gone to say to my little brother, that he should also visit this website on regular basis to obtain updated from most recent gossip.

# re: Fixing the Validation of viewstate MAC failed error issue.

Sunday, February 24, 2013 4:38 AM by Littlejohn

Hello this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors

or if you have to manually code with HTML. I'm starting a blog soon but have no coding experience so I wanted to get guidance from someone with experience. Any help would be greatly appreciated!

# re: Fixing the Validation of viewstate MAC failed error issue.

Monday, March 25, 2013 9:01 PM by Santiago

Thanks for the auspicious writeup. It if truth be told used to

be a entertainment account it. Look complicated to far brought agreeable from you!

However, how can we communicate?

# re: Fixing the Validation of viewstate MAC failed error issue.

Monday, April 8, 2013 6:59 AM by John

May favorite part is... "...viewstate MAC failed error. Looks like adding..."

:D