L
Ldraw
I have looked at all the Redirect questions on this site without finding a
resoultion
to my redirect problem. I am using sample code to verify a user and
password from a login page but although the verification is successful and I
can see that the return url is where I need to go I am continously looped
back to the login page.
Cookies are enabled. See code example below.
--WebConfig--
<authentication mode="Forms">
<forms name="TestLoginAthu" path="/" loginUrl="WebForm1.aspx"
protection="All" timeout="30">
<credentials passwordFormat="Clear">
<user name="jeff" password="test" />
<user name="mike" password="test" />
</credentials>
</forms>
</authentication>
--Code Behind
HttpCookie cookie = FormsAuthentication.GetAuthCookie ( TextBox1.Text,
CheckBox1.Checked );
// Expires in 30 days, 12 hours and 30 minutes from today.
cookie.Expires = DateTime.Now.Add(new TimeSpan(30, 12, 30, 0));
Response.Cookies.Add (cookie);
string strUrl = FormsAuthentication.GetRedirectUrl ( TextBox1.Text,
CheckBox1.Checked );
Response.Redirect( strUrl );
resoultion
to my redirect problem. I am using sample code to verify a user and
password from a login page but although the verification is successful and I
can see that the return url is where I need to go I am continously looped
back to the login page.
Cookies are enabled. See code example below.
--WebConfig--
<authentication mode="Forms">
<forms name="TestLoginAthu" path="/" loginUrl="WebForm1.aspx"
protection="All" timeout="30">
<credentials passwordFormat="Clear">
<user name="jeff" password="test" />
<user name="mike" password="test" />
</credentials>
</forms>
</authentication>
--Code Behind
HttpCookie cookie = FormsAuthentication.GetAuthCookie ( TextBox1.Text,
CheckBox1.Checked );
// Expires in 30 days, 12 hours and 30 minutes from today.
cookie.Expires = DateTime.Now.Add(new TimeSpan(30, 12, 30, 0));
Response.Cookies.Add (cookie);
string strUrl = FormsAuthentication.GetRedirectUrl ( TextBox1.Text,
CheckBox1.Checked );
Response.Redirect( strUrl );