Validation of viewstate MAC failed. - Not on a web farm, happens on a button click
<p>I've seen this question asked a lot but none of the questions or answers I've seen seem to address my problem. As the title suggests, I am getting the always fun Validation of Viewstate error.</p>

<p>My company's website is hosted on Amazon EC2 so to the best of my knowledge is not a web farm as this is the only page the problem crops up.</p>

<p>We have a simple reviews page which comes up great and all elements on the page work great, including leaving new reviews. However the "flag review" button generates the viewstate error when clicked.</p>

<p>The actual code that is run when the button is clicked is as follows:</p>

<pre><code>protected void btnFlagReview_Click(object sender, EventArgs e)
{
    try
    {
        LinkButton btn = (LinkButton)sender;
        int id = Int32.Parse(btn.Attributes["rid"]);
        testimonials.updateModerated(false, id);

        MailMessage mail = new MailMessage();
        mail.To.Add("oursupport@emailaddress.com");
        mail.From = new MailAddress("ourwebmaster@emailaddress.com");
        mail.Subject = "A review has been flagged for moderation";
        string Body =
            "A user review has been flagged for moderation. Please Approve/Delete this review in the Admin Panel. ";
        mail.Body = Body;
        SmtpClient smtp = new SmtpClient();
        try
        {
            smtp.Send(mail);
        }
        catch (SmtpException ex)
        {
            if (ex.StatusCode == SmtpStatusCode.InsufficientStorage)
                smtp.Send(mail);//Send again to ensure this email gets sent 
        }

        string script = "&lt;SCRIPT type='text/javascript'&gt;alert('This review has been flagged for moderation.')&lt;/SCRIPT&gt;";
        Type t = typeof(String);
        ClientScript.RegisterStartupScript(t, "Script", script);
    }
    catch(Exception ee) {
        businessName.Text = ee.ToString();
    }
}
</code></pre>

<p>The code from the actual button is as follows:</p>

<pre><code>&lt;asp:LinkButton ID="btnFlagReview" OnClick="btnFlagReview_Click" rid='&lt;%# Eval("testimonialID") %&gt;' runat="server"&gt;flag&lt;/asp:LinkButton&gt;
</code></pre>

<p>I have even tried the solution I've found in other questions across the web and here like changing the page's validateRequest, enableEventValidation, and viewStateEncryptionMode just to see if they would work.</p>

<p>I am at a loss, considering the flag review action is so simple in comparison to a lot of the other things we do. Any help would be greatly appreciated.</p>
