Redirect not working

From: Ldraw (Ldraw_at_discussions.microsoft.com)
Date: 12/29/04


Date: Wed, 29 Dec 2004 10:27:01 -0800

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 );



Relevant Pages

  • Re: Oscommerce admin login
    ... How to create Oscommerce admin login? ... Please give me sample code. ... A default installation of OSCommerce don't have any special adminstration login. ...
    (comp.lang.php)
  • Problem with Membership login
    ... I am creating a site that contains a user login. ... video and sample code from asp.net on Membership and ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Authentication mess
    ... Yes here is some sample code: ... "rkbnair" wrote in message ... >> This functionality comes standard with Forms Authentication. ... >>> b) after login in, redirect to the requested page ...
    (microsoft.public.dotnet.framework.aspnet)
  • looking for Login code in VS
    ... Does anybody have a sample code or application how to add login to my app?. ... I think I have to use some singleton object called session to keep the ...
    (comp.lang.smalltalk)
  • Re: looking for Login code in VS
    ... Does anybody have a sample code or application how to add login to my app?. ... I think I have to use some singleton object called session to keep the connected user and other global objects. ...
    (comp.lang.smalltalk)