Validation of viewstate MAC failed

  • Thread starter George Thompson
  • Start date
G

George Thompson

Hi,

I come from an ASP background, and I am currently working on a .NET
project, so please excuse me if this is a dumb question ...

I have written a dynamically generated menu that uses the following
structure (looping through for each menu item needing to be
displayed):

<tr>
<td class='menuclass' onmouseout='menu(this)'
onmouseover='menu_over(this)'>My Menu Text</td>
</tr>

the result is that the td, whose class contains a bg image, has a
simple mouse over image change. Now what I would like to do is have
it so that if you click anywhere on the td, it fires an onclick event
like this:

onclick="aspnetForm.action='mynewpagetogoto.aspx';
aspnetForm.submit();"

This works fine in an asp environment, however when I click on a td
with that onclick event in an asp.net environment I get this 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.

as a result I am being forced to set an href link around the text
instead ... although this works, it would be ideal to have the entire
td clickable because the image change that happens does suggest that
it is and may be confusing for visitors.

Also, more importantly, I would like to understand the source of this
error, as it does surprise me that I cannot navigate away from this
page in this fashion.

Any help would be greatly appreciated!

Thanks!
 
G

George Thompson

sorry, just realized i posted to the wrong group... reposted to
framework.aspnet & net.security.
 

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

Top