Cookies, Session State, and Multiple users

Discussion in 'ASP .Net' started by Tim Meagher, Sep 12, 2005.

  1. Tim Meagher

    Tim Meagher Guest

    I am trying to use Forms Authentication for a web page with cookies and a
    session state. I'm getting a little confused about how to use both and how
    the timeouts work. My goal is to have a web page that uses forms
    authentication with login info stored in a database, but also to use some
    session info during the course of the application. It used to be that when
    my cookie expired, the next time a hit anything on the web page I would
    encounter the login screen as desried. But then I added session state to
    preserve information for the length of the session. Can anyone point me to
    some decent articles or information that discusses there various options?

    Thank you!
    Tim Meagher, Sep 12, 2005
    #1
    1. Advertising

  2. Hi Tim,

    Which portion exactly are you confused about?

    Cookies are on the client, and Session on the server. Therefore timeouts
    will be separate. The only linking entity is that the cookie will hold the
    session id of the client. When the client makes a request, asp.net would
    access the session id to fetch the client's session state information.

    This msdn page lists all information on Forms Authentication:
    http://msdn.microsoft.com/library/en-us/cpguide/html/cpconthecookieauthenticationprovider.asp

    Let me know if you need more assistance.

    --
    HTH,
    Rakesh Rajan
    MVP, MCSD
    http://www.msmvps.com/rakeshrajan/



    "Tim Meagher" wrote:

    > I am trying to use Forms Authentication for a web page with cookies and a
    > session state. I'm getting a little confused about how to use both and how
    > the timeouts work. My goal is to have a web page that uses forms
    > authentication with login info stored in a database, but also to use some
    > session info during the course of the application. It used to be that when
    > my cookie expired, the next time a hit anything on the web page I would
    > encounter the login screen as desried. But then I added session state to
    > preserve information for the length of the session. Can anyone point me to
    > some decent articles or information that discusses there various options?
    >
    > Thank you!
    >
    >
    >
    =?Utf-8?B?UmFrZXNoIFJhamFu?=, Sep 12, 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. shamanthakamani
    Replies:
    1
    Views:
    3,469
    Natty Gur
    Nov 20, 2003
  2. jnickfl1
    Replies:
    0
    Views:
    570
    jnickfl1
    Sep 18, 2006
  3. mcbobin
    Replies:
    3
    Views:
    515
    mcbobin
    Jan 2, 2007
  4. archana
    Replies:
    0
    Views:
    331
    archana
    Mar 13, 2007
  5. _Who
    Replies:
    7
    Views:
    2,630
Loading...

Share This Page