G
Guest
I am trying to create ASPX code which will allow me to redirect a user to
another site with POST data. I figure that the best way to do this is with
JavaScript to the client. Here's what I'm doing:
I have a JavaScript function that looks like this:
function DoPostRedir()
{
document.MainFrm.method = "POST";
document.MainFrm.action = "http://XXX.YYY.com/Help/";
document.MainFrm.submit();
}
In my ASPX CS code, I write a Hidden field to the Form.
But when I try to run this, the destination page of the POST (on a
completely different web server over which I will not have control in the
future) gives me 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."
I have a feeling that this has something to do with the fact that I'm
posting to a different server or something? Is it a security thing?
How do I build a nice, clean form and force it to be posted to another site
so that it really only contains the Hidden field of data that I want to pass
along?
Alex
another site with POST data. I figure that the best way to do this is with
JavaScript to the client. Here's what I'm doing:
I have a JavaScript function that looks like this:
function DoPostRedir()
{
document.MainFrm.method = "POST";
document.MainFrm.action = "http://XXX.YYY.com/Help/";
document.MainFrm.submit();
}
In my ASPX CS code, I write a Hidden field to the Form.
But when I try to run this, the destination page of the POST (on a
completely different web server over which I will not have control in the
future) gives me 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."
I have a feeling that this has something to do with the fact that I'm
posting to a different server or something? Is it a security thing?
How do I build a nice, clean form and force it to be posted to another site
so that it really only contains the Hidden field of data that I want to pass
along?
Alex