Forms Authentication problem

Discussion in 'ASP .Net Security' started by Ben, Aug 3, 2005.

  1. Ben

    Ben Guest

    Hi,

    I am using forms authentication. When the user clicks the "Logout" button
    and then tries to login again, all is well. But when the user closes the
    browser and comes back in, the app thinks that the user is still logged in.

    I am using cookies. How can I check for this problem and clear it?

    Thanks

    Ben
     
    Ben, Aug 3, 2005
    #1
    1. Advertisements

  2. Ben

    Brock Allen Guest

    Sounds like whereever you're calling FormsAuthentication.SetAuthCookie or
    FormsAuthentication.RedirectFromLoginPage you're passing true as the 2nd
    parameter. Pass false -- this says to not use a persistent cookie.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Hi,
    >
    > I am using forms authentication. When the user clicks the "Logout"
    > button and then tries to login again, all is well. But when the user
    > closes the browser and comes back in, the app thinks that the user is
    > still logged in.
    >
    > I am using cookies. How can I check for this problem and clear it?
    >
    > Thanks
    >
    > Ben
    >
     
    Brock Allen, Aug 3, 2005
    #2
    1. Advertisements

  3. Ben

    Ben Guest

    Brock,

    Setting the second parameter to false did the trick!

    Thanks for your help!

    Ben

    "Brock Allen" wrote:

    > Sounds like whereever you're calling FormsAuthentication.SetAuthCookie or
    > FormsAuthentication.RedirectFromLoginPage you're passing true as the 2nd
    > parameter. Pass false -- this says to not use a persistent cookie.
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >
    >
    >
    > > Hi,
    > >
    > > I am using forms authentication. When the user clicks the "Logout"
    > > button and then tries to login again, all is well. But when the user
    > > closes the browser and comes back in, the app thinks that the user is
    > > still logged in.
    > >
    > > I am using cookies. How can I check for this problem and clear it?
    > >
    > > Thanks
    > >
    > > Ben
    > >

    >
    >
    >
    >
     
    Ben, Aug 5, 2005
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Connell
    Replies:
    1
    Views:
    713
    Natty Gur
    Oct 21, 2003
  2. raj mandadi
    Replies:
    0
    Views:
    560
    raj mandadi
    Dec 22, 2003
  3. Brett Porter
    Replies:
    2
    Views:
    1,019
    Andrea D'Onofrio [MSFT]
    Jan 20, 2004
  4. Brett Porter
    Replies:
    5
    Views:
    782
    Brett Porter
    Feb 3, 2004
  5. Eric
    Replies:
    2
    Views:
    1,787
    Tommy
    Feb 13, 2004
  6. JEFF
    Replies:
    1
    Views:
    1,241
    =?Utf-8?B?YnJpYW5zW01DU0Rd?=
    Nov 12, 2007
  7. Keltex
    Replies:
    1
    Views:
    555
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  8. Eric
    Replies:
    2
    Views:
    932
Loading...