Hello all,
I am trying to pass data between two files using POST method.
I am using Visual Studio 2008 and working in C# Environment to run this in ASP.net.
The code i am using is:
sareeweb.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="sareeweb.aspx.cs" Inherits="_Default" %>
<!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>
</head>
<body>
<form id="form1" action="logink.aspx" method="post" runat="server">
<div>
Name <input type="text" name="Name"/>
Age <input type="text" name="Age"/>
<input type="submit" />
</div>
</form>
</body>
</html>
logink.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="logink.aspx.cs" Inherits="logink" debug="true"%>
<!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>
</head>
<body>
<form id="form1" runat="server">
<div>
<%
string name, age;
name = Request.Form["Name"];
age = Request.Form["Age"];
Response.Write(name);
Response.Write(age);
%>
</div>
</form>
</body>
</html>
This is all what i am using and i keep getting errors on logink.aspx
Errors:
Server Error in '/sareeweb' Application.
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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: 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.
Source Error:
[No relevant source lines]
Can some one please shed some light on this please :(
Thank you.