Re: login redirect doesn't work

From: gorden blom (gordenblom_at_hotmail.com)
Date: 10/07/03


Date: 7 Oct 2003 11:53:19 -0700


"Lauchlan M" <LMackinnon@Hotmail.com> wrote in message news:<OxhpPaMjDHA.2704@TK2MSFTNGP10.phx.gbl>...
> > build a login screen at witch users can login. All goes fine until I
> > try to redirect the user to the protected pages.
>
> Well, what happens when you try to redirect the user?

When I push the login button, I'll see no error message. I'm sure that
my input is correct because that is handeled by my code, it will
display something in the lblOutput when something is wrong or input
isn't correct.

the address bar is: http://localhost/login.aspx?ReturnUrl=%2fsecret%2fProtectedPage.aspx
but it doesn't redirect or authenticate the user so I'll be stuck on
the login page.
>
> Also, maybe try first working with RedirectFromLoginPage instead of
> Response.Redirect, as this does the login behind the scenes. When this works
> you can go back to setting up the cookie yourself.

When I use the RedirectFromLoginPage, I have to delete 2 lines en
replace them by 1:
FormsAuthentication.RedirectFromLoginPage (txtUsername.Text, true);
but this gave me the same result as above with the redirect, I think
my code doesn't authenticate the right way.

>
> If you do set up the authentication cookie yourself, you will probably have
> to code the global.asax authentication handler.
>
> HTH
>
> Lauchlan M

Hope you can help me out!



Relevant Pages

  • Re: Default.aspx - newbie Q`
    ... check and redirect to the ReturnURL or Selected.aspx depending on the case. ... > and replace it with something that takes then straight to the login page. ... >> Curt Christianson ... >>> authentication ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Default.aspx - newbie Q`
    ... check and redirect to the ReturnURL or Selected.aspx depending on the case. ... > and replace it with something that takes then straight to the login page. ... >> Curt Christianson ... >>> authentication ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: doesnt redirect
    ... Look under the Security tab. ... One of them is called the Internet zone and probably the one you are using. ... or better explain what you mean by>> redirect ... I think there are 2 interstitchal pages after submitting those login credentials before you get to the mailbox web page. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Login problem
    ... redirect the user. ... Samuel Shulman wrote: ... Use either Forms Authentication or Basic Authentication. ... If the user types in the url the Login.aspx file then enters the username and the password, clicks the login button and the form validates the values against values from the database ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Stuck with form validation
    ... stay in the login page ... Not quite sure what you are expecting $sql to be. ... #redirect to other page ... Returns the number of rows affected by the last row affecting command, ...
    (perl.dbi.users)