Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Logging users in/out with Session object

Reply
Thread Tools

Logging users in/out with Session object

 
 
Christopher M.
Guest
Posts: n/a
 
      12-03-2010
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.)


 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      12-03-2010
Christopher M. wrote:
> I'm using the Session object to manage things like usernames and
> passwords. (I'm not concerned about security.)


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?


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      12-03-2010
Bob Barrows wrote on 03 dec 2010 in
microsoft.public.inetserver.asp.general:

[...]

> Christopher M. wrote:
>> 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.


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?

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


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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stored Session object is mixed up with another user's session object. momo898 ASP .Net 2 10-12-2006 03:33 PM
logging buffered vs. logging history Christian Roos Cisco 4 02-05-2006 10:55 PM
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
java.util.logging, where to put logging.properties? janne Java 0 09-10-2004 10:18 AM
[java.util.logging] logging only to _one_ file Stefan Siegl Java 0 08-27-2003 12:29 PM



Advertisments