D
D. Shane Fowlkes
This is a repost (pasted below). Since my original post, I've double
checked the system clock and set all IIS Session Timeout values to 10
minutes. Still ...the problem occurs. I've also installed Deep Metrix Live
Stats 6.2 XPS just to make sure nothing really strange was going on was
going on. Still....the sessions only increment...or should I say my counter
in my asax file.... and never goes down.
If it matters, this machine is hosting 3 sites and it has a single IP
address. I've set IIS 5 to look at the host headers and redirect to the
"site" on itself. This is done every day and I can't possibly see how this
would effect the Sessions but you never know.
I'm totally stumped!! Thoughts?....
*****************
I'm using ASP(.NET) trickery to show the number of "current users" on one of
my web sites (http://www.drpt.virginia.gov). I use this method on a few of
my sites but it seems that only this one (on this machine) gives me trouble.
The trouble seems that the sessions simply never end so the code in my Sub
Session_OnEnd is never fired. As I understand it, sessions will expire
after 20 minutes but default if there is no further activity from the
requestor. Yet, my counter never seems to decrement....only increment. My
code is below and I don't think it's a code (ASP) issue...this is a common
trick and this exact code works fine on other sites. I think it's an issue
with this one machine. Can anyone help or tell me what to check??
Thanks!!
My global.asax file:
'***************************************************
Sub Application_OnStart
Application("URLSeed") = "http://www.drpt.virginia.gov/"
Application("CurrentSessions") = 0
Application("TotalSessions") = 0
End Sub
'**************************************************
Sub Application_OnEnd
Application("URLSeed") = Nothing
End Sub
'**************************************************
Sub Session_OnStart
'============================================
'===== Updating Current Sessions ====================
'============================================
Application.Lock
Application("TotalSessions") = CInt(Application("TotalSessions")) + 1
Application("CurrentSessions") = CInt(Application("CurrentSessions")) + 1
Application.Unlock
End Sub
'**************************************************
Sub Session_OnEnd
Application.Lock
Application("CurrentSessions") = CInt(Application("CurrentSessions")) - 1
Application.Unlock
'Killing user's session variables
Session.Abandon()
End Sub
'***************************************************
checked the system clock and set all IIS Session Timeout values to 10
minutes. Still ...the problem occurs. I've also installed Deep Metrix Live
Stats 6.2 XPS just to make sure nothing really strange was going on was
going on. Still....the sessions only increment...or should I say my counter
in my asax file.... and never goes down.
If it matters, this machine is hosting 3 sites and it has a single IP
address. I've set IIS 5 to look at the host headers and redirect to the
"site" on itself. This is done every day and I can't possibly see how this
would effect the Sessions but you never know.
I'm totally stumped!! Thoughts?....
*****************
I'm using ASP(.NET) trickery to show the number of "current users" on one of
my web sites (http://www.drpt.virginia.gov). I use this method on a few of
my sites but it seems that only this one (on this machine) gives me trouble.
The trouble seems that the sessions simply never end so the code in my Sub
Session_OnEnd is never fired. As I understand it, sessions will expire
after 20 minutes but default if there is no further activity from the
requestor. Yet, my counter never seems to decrement....only increment. My
code is below and I don't think it's a code (ASP) issue...this is a common
trick and this exact code works fine on other sites. I think it's an issue
with this one machine. Can anyone help or tell me what to check??
Thanks!!
My global.asax file:
'***************************************************
Sub Application_OnStart
Application("URLSeed") = "http://www.drpt.virginia.gov/"
Application("CurrentSessions") = 0
Application("TotalSessions") = 0
End Sub
'**************************************************
Sub Application_OnEnd
Application("URLSeed") = Nothing
End Sub
'**************************************************
Sub Session_OnStart
'============================================
'===== Updating Current Sessions ====================
'============================================
Application.Lock
Application("TotalSessions") = CInt(Application("TotalSessions")) + 1
Application("CurrentSessions") = CInt(Application("CurrentSessions")) + 1
Application.Unlock
End Sub
'**************************************************
Sub Session_OnEnd
Application.Lock
Application("CurrentSessions") = CInt(Application("CurrentSessions")) - 1
Application.Unlock
'Killing user's session variables
Session.Abandon()
End Sub
'***************************************************