Re: Sessions never end? IIS 5.1.
From: D. Shane Fowlkes (shanefowlkes_at_h-o-t-m-a-i-l.com)
Date: 06/23/04
- Next message: Philip Rayne: "debug problem"
- Previous message: Ignacio Machin \( .NET/ C# MVP \): "Re: DataBinding"
- In reply to: Ireney Berezniak: "Re: Sessions never end? IIS 5.1."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Jun 2004 08:47:53 -0400
Thanks for the reply! In fact, the system clock was set to 12 hours ahead
of the real time (pm instead of am). So...how could that effect it? Thanks
"Ireney Berezniak" <ireney.berezniak@gmail.com> wrote in message
news:5V7Cc.16132$mm3.1195@clgrps13...
> I didn't look at your code ... it seems that it maybe an IIS or server
> host issue, if the code works on all machines but that one.
>
> First, I recommend that you check server settings and ensure that the
> system time/clock is set correctly. Second, check your IIS application
> configuration. To do so, in IIS MMC load the properties dialog for the
> web site. Under "Home Directory" tab, click the "Configuration..."
> button, and click on the "Options" tab in the dialog that pop-ups.
> Check the application configuration there and ensure that session state
> is set to time out after the desired amount of time.
>
> ib.
>
> D. Shane Fowlkes wrote:
>
> > I posted this on the MS IIS NG but that NG is slow to respond so I
thought
> > I'd try here to....
> >
> >
> > 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
> > '*********************************************************
> >
> >
> >
> >
- Next message: Philip Rayne: "debug problem"
- Previous message: Ignacio Machin \( .NET/ C# MVP \): "Re: DataBinding"
- In reply to: Ireney Berezniak: "Re: Sessions never end? IIS 5.1."
- Messages sorted by: [ date ] [ thread ]