I'm tracking usersOnline by adding this code below in my Global.asax
file.But i noticed that when a user logs in it keeps adding a new user
which thats fine..but when a user logs of it still retains the
user(session) for sometime instead of reducing it by one!
I'm thinking of maybe i should change something in IIS relating to
Session?
Any ideas..
Sub Session_Start(B yVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
Session("Start" ) = Now
Application.Loc k()
Application("Ac tiveUsers") = CInt(Applicatio n("ActiveUsers" )) +
1
Application.UnL ock()
End Sub
--------------------------
Sub Session_End(ByV al sender As Object, ByVal e As EventArgs)
' Fires when the session ends
Application.Loc k()
Application("Ac tiveUsers") = CInt(Applicatio n("ActiveUsers" )) -
1
Application.UnL ock()
End Sub
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
file.But i noticed that when a user logs in it keeps adding a new user
which thats fine..but when a user logs of it still retains the
user(session) for sometime instead of reducing it by one!
I'm thinking of maybe i should change something in IIS relating to
Session?
Any ideas..
Sub Session_Start(B yVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
Session("Start" ) = Now
Application.Loc k()
Application("Ac tiveUsers") = CInt(Applicatio n("ActiveUsers" )) +
1
Application.UnL ock()
End Sub
--------------------------
Sub Session_End(ByV al sender As Object, ByVal e As EventArgs)
' Fires when the session ends
Application.Loc k()
Application("Ac tiveUsers") = CInt(Applicatio n("ActiveUsers" )) -
1
Application.UnL ock()
End Sub
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Comment