Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: who is online?


Message #1 by "Rabih Yazbeck" <rabihy@h...> on Sun, 24 Feb 2002 17:02:01
From what I understand, your case is like this:
- You have a database, that stores the online status of every user.
- Once the user log in, his status is online
- Once he log out, or he just close every single browser of your 
application, his status should be back to offline.

I have a simple suggestion (from my knowledge up to now).

On the server side, 
you should have a Service or Server Application that runs in the 
background to check the database for logged-in users going Offline (using 
a Time-out period).
You must have another field in you users table like 'LastOnlineDateTime'.

On the client side, 
if your application is browser-based, you should have a inline frame (in 
every web page, although it will be resource-extensive) that reloads 
itself every 2 seconds to notify the server that the user is still online.
(set the field 'LastOnlineDateTime' to current time)
if your application is Windows-based, then you don't need this post 
anymore, since you can change the user's status to Offline in the 
Form_unload event.

If you need more details on implementation, either reply to this post, or 
send me an email (mangokun@h...) then I will try to reply with the 
way to implement my suggestion.

> hi,
> 
> I am planing to implement an application that let me track and list 
online 
> clients.
> 
> I have an application done with ASP3, it updates the database and change 
> the status on the database from offline to online once the user log in. 
> But i heard that it could be done much easier and more efficient with 
> ASP.NET 
> 
> I read that i can putnevery client, once he logs in, in Application. So 
i 
> can check who is online, but how i can check if he went offline (by 
> closing the browser)? and do you think i can put the online buddies in 
> array in the Application? any example on the web or asptoday?
> 
> My old application has lot of backwards because it can not check if user 
> is offline, because viewers does not logoff, they just close the 
browser...
> 
> What is the best way in sending online messages. or online 
notifications. 
> Or developping a "buddies" list with ASP.NET 
> 
> 
> Thank you in advance, 
> Raby

  Return to Index