Remember me timeout

Last post 05-31-2006 7:47 PM by MrLunch. 1 replies.

Sort Posts:

  • Remember me timeout

    05-31-2006, 6:17 AM
    • Member
      65 point Member
    • lucifer
    • Member since 01-13-2006, 12:54 PM
    • Posts 13

    Enyone know where in the code I need to set the timeout for the "Remember me" choice when logging in.

    I want to let my logged in members to automatically log in for lets say 1 or 2 days.

  • Re: Remember me timeout

    05-31-2006, 7:47 PM
    • Member
      727 point Member
    • MrLunch
    • Member since 08-09-2005, 1:04 AM
    • Silicon Valley
    • Posts 144

    Remember me is deep in the bowels of FormsAuthentication - google 'createPersistentCookie' to see various explanations.

    To set some other length of time (I think it's set to 6 months) you'd have to write your own login control and so the ticket and cookie yourself.

    Another way would be to get rid of the 'remember me' checkbox, and instead change the default forms cookie expiration length - see here http://msdn2.microsoft.com/en-us/library/1d3t3c61(VS.80).aspx

    The timeout value you could set to something other than 30 mins., you also have the sliding option.

    Mark Bracewell
    Forums Starter Kit
Page 1 of 1 (2 items)