Amol

Amol

  • NA
  • 208
  • 194.1k

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure t...

May 16 2012 12:55 PM
see the design code given below

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="testpage.aspx.vb" Inherits="testpage" 
EnableViewStateMac="false" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head  runat="server">
<title>Untitled Page</title>
 
<script type="text/javascript">
 
function callme(frmname)
{
var myForm = document.forms[frmname];
myForm.submit();
}
 
</script>
 
</head>
<body>
<form id="frm1" method="post" style='margin-top: 0px; margin-bottom: -10px'  runat="server"
action="Default.aspx">
<div id="button2" style="float: left;" önclick="callme('frm1');">
<a style="removed: pointer" class="smallfnt3">Register Now</a>
</div>
 
</form>
</body>
</html>

it shows error as

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.

Please Help.

Answers (1)