Logging users in/out with Session object

C

Christopher M.

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.)
 
B

Bob Barrows

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

:shock: That is the most foolhardy statement I have heard in a long time.
I'm having trouble overwriting session variables when a user tries to
log in with a different username and password.

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 :)
Exiting the browser seems to end the session.

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.
I've tried abandoning
the session and removing the contents of the session variables but it
doesn't seem to work.


How do you know?
 
E

Evertjan.

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

[...]
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.

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.
How do you know?

Indeed.

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

Show us an example script, OP.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top