Determine users currently logged in

  • Thread starter Thread starter Benedictum
  • Start date Start date
B

Benedictum

I need to implement an option to display on the web page for users currently
logged in. How do I implement this in ASP.NET (c#).

I could probably have a boolean field in the database where a user can be
set as logged. This can easily be done in the code-behind. The problem is
how do I "unlogged" the user when the session is timed out?
 
The registered users are authenticated against a datafile. Particulars are
kept in a a seesion var.

Can you show me a code snippet or direct me a tutorial on how to go about
this?
Thanks.
 
What happens then when the user just closes the browser? How do handle this?

Mark Rae said:
[top-posting corrected]
The registered users are authenticated against a datafile. Particulars
are kept in a a session variable.

OK, so when a user logs out, remove them from the session variable.

And, when a session times out, remove the user from the session variable
through the Session_End code in global.asax.
http://www.google.co.uk/search?sour...4GZEZ_en-GBGB252GB252&q="ASP.NET"+Session_End
 
Back
Top