On Fri, 6 Oct 2006 04:40:02 -0700, Peter Bromberg [C# MVP]
<pb*******@yahoo.nospammin.comwrote:
>You can do this a lot easier with ASP.NET. Whenever a new user Session is
begun, in Session_Start, you can increment a static counter variable. On
Session_End, decrement the variable. If it is in Global.asax, then you can
refer to it anywhere in your app as "Global.CurrentUserCount".
There are situations where the no event is fired when the session
ends. I believe this is the case when a session is shared across
several machines in a web farm. In 2.0 the MembershipProvider type has
a method named GetNumberOfUsersOnline.
regards
A.G.