Logging users in/out with Session object

Discussion in 'ASP General' started by Christopher M., Dec 3, 2010.

  1. I'm using the Session object to manage things like usernames and passwords.
    (I'm not concerned about security.)

    I'm having trouble overwriting session variables when a user tries to log in
    with a different username and password.

    Exiting the browser seems to end the session. I've tried abandoning the
    session and removing the contents of the session variables but it doesn't
    seem to work.

    The site is hosted on Godaddy.

    Any ideas?

    Thanks.


    W. Pooh (AKA Winnie P.)
     
    Christopher M., Dec 3, 2010
    #1
    1. Advertisements

  2. Christopher M.

    Bob Barrows Guest

    :shock: That is the most foolhardy statement I have heard in a long time.
    What kind of trouble? Please try to describe your symptoms without using
    unhelpful generic terms like "not working", "having trouble", etc. We're not
    looking over your shoulder at your computer screen :)
    Well, duh! That is the definition of a session.
    Actually, a session is not cleared immediately when the browser is closed.
    Lack of activity causes it to expire which is a good thing because sessions
    consume system resources. Opening the browser again forces a new session to
    start.

    How do you know?
     
    Bob Barrows, Dec 3, 2010
    #2
    1. Advertisements

  3. Christopher M.

    Evertjan. Guest

    Bob Barrows wrote on 03 dec 2010 in
    microsoft.public.inetserver.asp.general:

    [...]
    There are two reasons why a session is no-longer available.

    1 the clientside session-id cookie has expired,
    because the browser is closed.

    2 the session is closed by serverside time-out.

    3 the session is closed by a serverside session.abandon command

    4 the serverside application has/is restarted.

    Hey, I count four already.
    Bob, are there more?

    You cannot remove session-variable content of a session.abandon-ned
    session, methinks.
    Indeed.

    "Doesn't work" is unacceptable newspeak
    without showing testing ways and results.

    Show us an example script, OP.
     
    Evertjan., Dec 3, 2010
    #3
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.