Check to see if Client is still Connected

They have: 82 posts

Joined: Oct 2001

Hey Guys,

I need the ability to see who is connected to my application.
The client must login to use this app. I am leaning toward putting a "connected" flag in the database. The only problem with this is how can I be certain the client is still there? I could do a
Sub window_OnUnload()

but I do not know how reliable this would be. Some users would not log out properly. They would just exit IE. I could have my app run in a pop-up that they could not shut down without clicking the log out button. I hate those things.

Any ideas?

Thanks

- Mike

Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

If you don't mind using sessions you could always use Session_OnEnd to clean up users who didn't log out properly.

They have: 82 posts

Joined: Oct 2001

This would involve a Global ASA correct?

I have not used the Global ASA much. It was frowned on on my last job. Although they never really gave me a rational explanation why.

Thanks,

mike

Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

Yes, you would be using the global.asa file for this. There is some extra overhead involved when using a global.asa file, but unless you have an extremely busy site the benefits it provides outweigh the performance issues.

PJ | Are we there yet?
pjboettcher.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.