On an ASP.NET site, what are some techniques that could be used to track how many users are logged in to the site at any given point in time?
So for example, I could
If using SQL Server for Session storage (i.e. mode is "SQLServer" in web.config), you can't use a solution that relies on Session_End in global.asax, as the method will never be called.
However, assuming that SQL Agent is running the DeleteExpiredSessions job correctly (which it should be by default when SQL State was installed), you can just run the following SQL against the Session Db:
SELECT COUNT(SessionId) FROM ASPStateTempSessions