List of active sessions?

M

Marcio Kleemann

Is there a way to get a list of the session id's for all currently active
sessions for the application?

Thanks
 
T

Teemu Keiski

Hi,

not automatically, but you certainly could develop such for yourself and
quite easily (incrementing and decrementing data to application when
sessions start and end)
 
I

Iouri

Private Sub btnSessions_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSessions.Click
Dim keys As NameObjectCollectionBase.KeysCollection = Session.Keys
Dim key As String
Dim sSessions As String
For Each key In keys
' key is the item's key
' Session[key] returns the item's value
sSessions &= key.ToString & " - " & Session(key).ToString &
vbCrLf
Next key '
If sSessions.Length = 0 Then
txtSessions.Text = "No Active Sessions"
Else
txtSessions.Text = sSessions
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top