[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Getting "Validation of viewstate MAC failed" only with IE on some machines

Posted on 2011-09-19
2
Medium Priority
?
1,258 Views
Last Modified: 2012-05-12
HI, I have a web application that is used by the company I work for. It is running on a Windows 2008 r2 server with IIS 7. I just started getting this error on one web page today, only on two users machines that I know of (mine included), it works on all otheres I have checked. I only get the error when using IE 9, I get no error if I hit the same page from Firefox.
The only clue I have is that server updates were performed this weekend, service packs installed, etc. I tried clearing out my cache. I'm stumped, any ideas?


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.

Open in new window

0
Comment
Question by:AkAlan
[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
2 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 2000 total points
ID: 36564834
In your web.config file have below changes.

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

Refer the thread: http://forums.asp.net/t/1355367.aspx/1

if does not work update the machine key in the web.config file

http://www.shnake.com/blog/?p=604
0
 
LVL 6

Author Comment

by:AkAlan
ID: 36568784
EaswaranP, Thanks for your reply. I think I have a couple of things going on that contributed to the exception happening on just a couple of machines. I was looking into getting faster page loads a couple of weeks back and ended up putting this code in the Page Load event of the page in question.
  'Response.Cache.SetExpires(DateTime.Now.AddMonths(1))
   'Response.Cache.SetCacheability(HttpCacheability.ServerAndPrivate)
   'Response.Cache.SetValidUntilExpires(True)
I had forgot about it until today when I was still getting the exception.
I remarked it out and after clearing the users cache, no more exception.
I am using Telerik controls and I need to have viewstate enable for the gridview on the page, at least I'm pretty sure of that.
Not being a real asp.net expert, I am not certain why I got the exception on only a couple of machines so if any of this makes sense to you and you can give me any further guidance, I would appreciate it. I will give you the points either way. thanks for your assistance.  
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

656 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