Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to see which users with a session are online ?

Status
Not open for further replies.

MrStiffler

Programmer
Jan 7, 2004
25
0
0
CH
I have a ASP/IIS 5 Webapplication where usere become a session identification number at onstart !

How can i get a list of all online users ( List of active sessions) ?

Another way is to write a online - stat to a database, but i think this uses more system resources and could slow down the application, so i'm looking for a easier way to do this.
thx
 
Though this may not be what you want, I would recommend you to keep a text log instead. It uses very little resources. Personally I log my users during login and logout for my system using the following subroutine.


<%
Const ForAppending = 8
Sub WriteToLog(myText)

Dim fso
Dim ts
Dim strFolder
Dim strFile
Dim strYrFolder, strMthFolder

'Initialise and set the variables
strYr = Year(Now)
strMth = MonthName(Month(Now), true) & strYr
strFolder = &quot;D:\System\Log\&quot;
strFile = strFolder & &quot;\ABC.log&quot;

'Write to Log.
Set ts = fso_OpenTextFile(strFile, ForAppending, true)
ts.WriteLine Now() & vbTab & myText
ts.Close()

Set ts = Nothing
Set fso = Nothing

End Sub
%>

rgds,
Nickson
 
how are you storing your session identification.

could you not loop through this collection?

for each user in ....
' do whatever
next

simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top