Re: Validation of viewstate MAC failed
- From: Dominick Baier [DevelopMentor] <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 29 May 2006 11:35:50 +0000 (UTC)
Hi,
what you are trying to do is against how ASP.NET works - ASP.NET uses the single page model - the viewstate you send to the other page cannot be parsed (and there is some viewstate when you look in the hidden fields in HTML)
either post back to the same page - parse the data and do the redirect on the server or use the new asp.net cross page postback facility.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
I have some problems with a site project im working on.
It should be easy, but im running into an error.
My page has a server sided form and client sided (basic html)
textboxes, a
button and a simple jscript to submit the form to an other page.
Currently there are no asp.net controls on the page.
I have been looking on different forums and no solution to be found,
it seems te be a bug in the .NET framework.
When i submit the form 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.
ASPX Page:
<form id="form1" runat="server">
<input id="Button1" type="button" value="button"
onclick="Form_Submit()"
/><br />
<input name="Text1" id="Text1" type="text" /><br />
<input name="test2" id="Text2" type="text" /><br />
</form>
Java Script:
function Form_Submit()
{
document.forms[0].action = "test.aspx";
document.forms[0].submit();
}
.
- Follow-Ups:
- Re: Validation of viewstate MAC failed
- From: Deborggraeve Randy
- Re: Validation of viewstate MAC failed
- From: Deborggraeve Randy
- Re: Validation of viewstate MAC failed
- References:
- Validation of viewstate MAC failed
- From: Deborggraeve Randy
- Validation of viewstate MAC failed
- Prev by Date: Validation of viewstate MAC failed
- Next by Date: Re: website restricted to fixed public IP or to only PC wth predefined configuration
- Previous by thread: Validation of viewstate MAC failed
- Next by thread: Re: Validation of viewstate MAC failed
- Index(es):