title: setting action in form tag generates error "Validation of viewstate MAC failed..."
body: <p>I am setting <code>action</code> in <code>form</code> tag and getting the error below:</p>
  
  <p><em>Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that  configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.</em></p>
  
  <p>I have tried the following things:</p>
  
  <ol>
  <li>Set machine config key in web.config.</li>
  <li>Set EnableViewStateMac="false" in page</li>
  <li>Set ViewStateEncryptionMode="Never"</li>
  <li>Set EnableEventValidation="false"</li>
  </ol>
  
  <p>but no luck.</p>
  
  <p>Any guidance please.</p>
  
  <p>Thakns for your help and sharing.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Here is markup of my page.</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
  EnableViewStateMac="false" ViewStateEncryptionMode="Never" EnableEventValidation="false" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="aspnetForm" method="post" action="Test.aspx" runat="server"&gt;
      &lt;div&gt;
          &lt;asp:TextBox runat="server" ID="txt1"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;
          &lt;asp:TextBox runat="server" ID="txt2"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;
          &lt;asp:Button runat="server" ID="btn" Text="Click" /&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>