Error: Validation of viewstate MAC failed

S

Sergej Grickov

Hello, all!

I started to develop my application with ASP.Net 2.0 and got the strange
behavior with pages, where user change any form control (i.e. checkbox,
button, etc.).

Ex.: when I clicked on button - page is not submit (postback);
if I create dropdown box with AutoPostBack = true, or change button property
to UseSubmitBehavior = false,
I get error (only in IE!):

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.

But, all my pages perfectly worked in Firefox!!!

After researching, I founded solution for that: add to web.config file
section :
<pages enableViewStateMAC = "false" />
BUT, I still get same error :(

Environment: Windows XP Pro with Framework 1.1/2.0 installed, Visual Studio
2005, local IIS.

Please, any help !!!!

Best regards,
Sergej Grickov.

Kaunas, Lithuania.
 
S

Sergej Grickov

Thank you, Alvin!
BTW, today I tried same project with same environment on another PC (my home
PC), and all works OK!
Seems, that my home PC's and local IIS (Windows XP SP2) has another
settings: another antivirus program,
another firewall settings and, maybe, something yet...

Thank you for help.
Best regards,
Sergej Grickov.

Alvin Bruney - ASP.NET MVP said:
http://support.microsoft.com/default.aspx?scid=kb;en-us;555353 see this
link

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Sergej Grickov said:
Hello, all!

I started to develop my application with ASP.Net 2.0 and got the strange
behavior with pages, where user change any form control (i.e. checkbox,
button, etc.).

Ex.: when I clicked on button - page is not submit (postback);
if I create dropdown box with AutoPostBack = true, or change button property
to UseSubmitBehavior = false,
I get error (only in IE!):

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.

But, all my pages perfectly worked in Firefox!!!

After researching, I founded solution for that: add to web.config file
section :
<pages enableViewStateMAC = "false" />
BUT, I still get same error :(

Environment: Windows XP Pro with Framework 1.1/2.0 installed, Visual Studio
2005, local IIS.

Please, any help !!!!

Best regards,
Sergej Grickov.

Kaunas, Lithuania.
 
T

Teemu Keiski

For the record, there can also be other causes for the error:

ASP.NET 2.0 and "Validation of ViewState Mac failed" exception
http://aspadvice.com/blogs/joteke/archive/2006/02/02/15011.aspx

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke


Sergej Grickov said:
Thank you, Alvin!
BTW, today I tried same project with same environment on another PC (my
home PC), and all works OK!
Seems, that my home PC's and local IIS (Windows XP SP2) has another
settings: another antivirus program,
another firewall settings and, maybe, something yet...

Thank you for help.
Best regards,
Sergej Grickov.

Alvin Bruney - ASP.NET MVP said:
http://support.microsoft.com/default.aspx?scid=kb;en-us;555353 see this
link

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Sergej Grickov said:
Hello, all!

I started to develop my application with ASP.Net 2.0 and got the strange
behavior with pages, where user change any form control (i.e. checkbox,
button, etc.).

Ex.: when I clicked on button - page is not submit (postback);
if I create dropdown box with AutoPostBack = true, or change button property
to UseSubmitBehavior = false,
I get error (only in IE!):

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.

But, all my pages perfectly worked in Firefox!!!

After researching, I founded solution for that: add to web.config file
section :
<pages enableViewStateMAC = "false" />
BUT, I still get same error :(

Environment: Windows XP Pro with Framework 1.1/2.0 installed, Visual Studio
2005, local IIS.

Please, any help !!!!

Best regards,
Sergej Grickov.

Kaunas, Lithuania.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top