Login / Logout

Discussion in 'ASP .Net' started by MichaelR, Jan 5, 2005.

  1. MichaelR

    MichaelR Guest

    I have an asp.net application using forms authentication.

    1. It has a simple login page (login.aspx) that uses
    FormsAuthentication.RedirectFromLoginPage(. . . ).
    2. My application has a logout function that Redirects to signout.aspx.
    Signout.aspx invokes FormsAuthentication.Signout() when it loads.
    3. Signout.aspx also has a login button that redirects to my application
    page (index.aspx). Because the user is no longer authenticated, asp.net
    properly invokes the login.aspx page.
    4. If I login again using the same user id, no problem - I go right to
    5. However, if I login using a different user id, I get redirected to
    signout.aspx. I've tested the value of FormsAuthentication.GetRedirectUrl(.
    .. . ) and it is clearly setting the RedirectUrl to signout.aspx.

    Is there some way to prevent this from happening? Is it possible to set the
    RedirectUrl using my .Net code? Better yet, is there a recommended way to
    implement a login / logout function that will allow different user ids?
    MichaelR, Jan 5, 2005
    1. Advertisements

  2. MichaelR

    Karl Seguin Guest

    Karl Seguin, Jan 5, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.