Handle end session for win authentication

Discussion in 'ASP .Net' started by =?Utf-8?B?TmF5?=, Apr 3, 2005.

  1. Hi
    When we use forms authentication I set the time and a url for login page
    after configured amount of time, via web.config.
    But, what is the best practice to do it after configurable amount of time,
    or after session end when it is a windows authentication
     
    =?Utf-8?B?TmF5?=, Apr 3, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?TmF5?=

    Brock Allen Guest

    First thing to understand is that the forms authentication mechanism uses
    a different cookie than session state. So those have two independent timeouts.
    So regardless if you're using Forms or Windows authentication you have the
    same problem of the session potentially timing out prior to the user logging
    out (by losing the cookie or closing the browser). So, the way you code this
    is you code defensively. Always check to see if the data you put into Session
    is there and if it's not either refetch it (if you're using Session like
    a Cache) or if it's truly volatile data (like a Shopping Cart) then you need
    to deal with that contingency.

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



    > Hi
    > When we use forms authentication I set the time and a url for login
    > page
    > after configured amount of time, via web.config.
    > But, what is the best practice to do it after configurable amount of
    > time,
    > or after session end when it is a windows authentication
     
    Brock Allen, Apr 3, 2005
    #2
    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. ARaman
    Replies:
    1
    Views:
    404
    Mike Wahler
    Oct 23, 2003
  2. Chris Lyon
    Replies:
    0
    Views:
    348
    Chris Lyon
    Oct 7, 2003
  3. Ringwraith
    Replies:
    4
    Views:
    963
    Ringwraith
    Jan 27, 2004
  4. Krist
    Replies:
    6
    Views:
    786
    Arne Vajhøj
    May 7, 2010
  5. Peter Singer

    Web Services on Win 2003 to SQL Server on Win 2000

    Peter Singer, Sep 7, 2004, in forum: ASP .Net Web Services
    Replies:
    10
    Views:
    310
    Yan-Hong Huang[MSFT]
    Sep 15, 2004
Loading...

Share This Page