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. Advertising

  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. Advertising

  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. Advertising

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:
    546
    Natty Gur
    Oct 21, 2003
  2. Eric
    Replies:
    2
    Views:
    1,491
    Tommy
    Feb 13, 2004
  3. JEFF
    Replies:
    1
    Views:
    1,022
    =?Utf-8?B?YnJpYW5zW01DU0Rd?=
    Nov 12, 2007
  4. Keltex
    Replies:
    1
    Views:
    404
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  5. Eric
    Replies:
    2
    Views:
    553
Loading...

Share This Page