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
using 4.0.3 + integrated pipelines
On a server successully hosting other Umbraco sites using the same version (and it's not a web farm).
The error happens when doign a Save & Publish. The problem occurs intermittently but seems to happen most if there is a long delay between viewing the page and doing the save.
I have similar issue recently with non umbraco site and I did some googling and found that adding machineKey tag in web.config with generated validation key fixed the problem. So in your web.config under system.web add
<machineKey validationKey="addkey"
decryptionKey="addkey" validation="SHA1" />
replace add key with your keys there are online generators on web to create the keys. I have not seen this issue with umbraco so not sure if this will fix it.
I still receive this error every now and then. I'm using win 2003, Umbraco 4.5.2 and .net 3.5 version - single server. I've done a over 15 sites in Umbraco and the error has always come up. 98% of the tie it runs fine with just the odd viewstate error.
Was there ever a solution for this? I dont see many post about it. The suggestion above breaks my site,
I've got the same problem now, and adding the machineKey doesn't make a difference.
I created a usercontrol and added it to Umbraco. I did this before, and it was successful. The same usercontrol got just a bit more complex now.
The error occurs when I select a different item in a dropdownlist of the usercontrol, causing a postback event.
[Update]
I continued searching, and found the solution to my problem here: http://forums.asp.net/t/955145.aspx/2/10 ... joteke's tip did the trick for me, i.e. modifying Web.config this way:
When I got this error it was caused by a faulty character in the name of the node that I created. What happened was that I copied text from a powerpoint document and and somewhere in this string there was a hidden character (probably a line feed). Then I pasted this text as the name of the node (in this case a file in Media) that I was creating. When i tried to save the node I got the "Validation of viewstate MAC failed" error. After that I couldn't open the media folder where I had created the file.
This is how I fixed it:
Open up the umbraco database in Microsoft SQL Server Management Studio.
In the table umbracoNode, locate the row with the faulty node you just created. It will probably be the last (highest id).
Change the name (column "text") of the node so the faulty character is removed.
Log in to Umbraco and check that you can access the folder/file again.
Validation of viewstate MAC failed
has anyone else expereinced the error:
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
using 4.0.3 + integrated pipelines
On a server successully hosting other Umbraco sites using the same version (and it's not a web farm).
The error happens when doign a Save & Publish. The problem occurs intermittently but seems to happen most if there is a long delay between viewing the page and doing the save.
Any ideas?
Thanks
Paul
Paul,
I have similar issue recently with non umbraco site and I did some googling and found that adding machineKey tag in web.config with generated validation key fixed the problem. So in your web.config under system.web add
<machineKey validationKey="addkey"
decryptionKey="addkey" validation="SHA1" />
replace add key with your keys there are online generators on web to create the keys. I have not seen this issue with umbraco so not sure if this will fix it.
Regards
Ismail
Hi,
I still receive this error every now and then. I'm using win 2003, Umbraco 4.5.2 and .net 3.5 version - single server. I've done a over 15 sites in Umbraco and the error has always come up. 98% of the tie it runs fine with just the odd viewstate error.
Was there ever a solution for this? I dont see many post about it. The suggestion above breaks my site,
I am having the same issue. It's very intermittent. Is there a solution for this? My host is not a cluster.
@Paul: Did you ever find a solution to this? I'm struggling with the exact same issue :(
Hi i have been experiencing this ALOT on my shared hosting. it has been particularly troublesome today for some reason.
i followed Ismail's advice above, using http://aspnetresources.com/tools/machineKey to generate the key. pasted straight into system.web and seems to have sorted it.
it is early days yet, but things are certainly better, i'll re-post if things are not sorted
I've got the same problem now, and adding the machineKey doesn't make a difference.
I created a usercontrol and added it to Umbraco. I did this before, and it was successful. The same usercontrol got just a bit more complex now.
The error occurs when I select a different item in a dropdownlist of the usercontrol, causing a postback event.
[Update]
I continued searching, and found the solution to my problem here: http://forums.asp.net/t/955145.aspx/2/10 ... joteke's tip did the trick for me, i.e. modifying Web.config this way:
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" />
Rudi
When I got this error it was caused by a faulty character in the name of the node that I created. What happened was that I copied text from a powerpoint document and and somewhere in this string there was a hidden character (probably a line feed). Then I pasted this text as the name of the node (in this case a file in Media) that I was creating. When i tried to save the node I got the "Validation of viewstate MAC failed" error. After that I couldn't open the media folder where I had created the file.
This is how I fixed it:
After this I could open the media folder again.
/Thomas
is working on a reply...