K
kpg
Hi all,
Ah yes, the age old counting session question.
sessionstate
mode="InProc"
timeout="5"
Sub Application_Start()
Application("ConcurrentUsers") = 0
End Sub
Sub Session_Start()
Application.Lock()
Application("ConcurrentUsers") += 1
Application.UnLock()
End Sub
Sub Session_End()
Application.Lock()
Application("ConcurrentUsers") = -= 1
Application.UnLock()
End Sub
All's well, At first arrival of the login page Trace shows
ConcurrentUsers = 1
After login I navigate to a page that displays the count.
Still OK, trace and a label shows ConcurrentUsers = 1.
Private Sub Page_Load()
lblUsers.Text = Application("ConcurrentUsers")
End Sub
I have an "Update" button which does nothing but causes a
post back to re-display the page.
Private Sub btnUpdate_Click()
'no code here
End Sub
Trace and txtUsers now shows session count = 0! The session_end
event has not fired yet the Application variable is reset to 0.
My thoughts are that this must be a known issue or I'm just
missing something very basic.
Ah yes, the age old counting session question.
sessionstate
mode="InProc"
timeout="5"
Sub Application_Start()
Application("ConcurrentUsers") = 0
End Sub
Sub Session_Start()
Application.Lock()
Application("ConcurrentUsers") += 1
Application.UnLock()
End Sub
Sub Session_End()
Application.Lock()
Application("ConcurrentUsers") = -= 1
Application.UnLock()
End Sub
All's well, At first arrival of the login page Trace shows
ConcurrentUsers = 1
After login I navigate to a page that displays the count.
Still OK, trace and a label shows ConcurrentUsers = 1.
Private Sub Page_Load()
lblUsers.Text = Application("ConcurrentUsers")
End Sub
I have an "Update" button which does nothing but causes a
post back to re-display the page.
Private Sub btnUpdate_Click()
'no code here
End Sub
Trace and txtUsers now shows session count = 0! The session_end
event has not fired yet the Application variable is reset to 0.
My thoughts are that this must be a known issue or I'm just
missing something very basic.