Hi,
I have a site with a lot off online users. I have a special frame that show
all logged in members and i update this frame in a minute intervall to
catch any mewly logged in members.

My problem is...i use a session time out set to 20 minutes. But the session
never dies. This must be a side effect off the timer i use.

How can i solve this problem? Any suggestion? I must kill session if the
member leaves without logg out.

Regards Mikael

Re: hi, i have some problem with session by Steven

Steven
Tue Apr 13 14:06:53 CDT 2004

I wrote a function that logged people out after a set period of time (60
mins), but unfortunately, it kept booting everyone after the set period of
time (active or not), so if you manage to find an answer to this, I'd also
welcome it.

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)


Mikael Hellström <micke.hellstrom@telia.com> wrote in message
news:yLWec.89628$dP1.267882@newsc.telia.net...
> Hi,
> I have a site with a lot off online users. I have a special frame that
show
> all logged in members and i update this frame in a minute intervall to
> catch any mewly logged in members.
>
> My problem is...i use a session time out set to 20 minutes. But the
session
> never dies. This must be a side effect off the timer i use.
>
> How can i solve this problem? Any suggestion? I must kill session if the
> member leaves without logg out.
>
> Regards Mikael
>
>



Re: hi, i have some problem with session by Ray

Ray
Tue Apr 13 14:10:35 CDT 2004

How are you tracking the list of users logged in? In an application
variable? In a database? Do you have logout functionality? Need more
info. Are you using global.asa with a SEssion_OnEnd to change the flag,
wherever that may be?

Ray at work


"Mikael Hellström" <micke.hellstrom@telia.com> wrote in message
news:yLWec.89628$dP1.267882@newsc.telia.net...
> Hi,
> I have a site with a lot off online users. I have a special frame that
show
> all logged in members and i update this frame in a minute intervall to
> catch any mewly logged in members.
>
> My problem is...i use a session time out set to 20 minutes. But the
session
> never dies. This must be a side effect off the timer i use.
>
> How can i solve this problem? Any suggestion? I must kill session if the
> member leaves without logg out.
>
> Regards Mikael
>
>



Re: hi, i have some problem with session by Mikael

Mikael
Tue Apr 13 14:28:29 CDT 2004

Hi, more info...
I track the on-line user in a database (sql-server 2000).
When the loggen in user press loggout button i call session.abandon.

In my global.asp i have code in (Session_OnEnd )that delete the user from
the data base.
Before i use the timer the system worked soo fine. When the people fall a
sleep he automatic
where deleted from db.

This system works great for me until i started to use the timer to update my
online list.
The update system with the timer is ruin everything here...

Question. How can i solve this on some way??

Regards Mikael



"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:%23Lf5AsYIEHA.3664@TK2MSFTNGP11.phx.gbl...
> How are you tracking the list of users logged in? In an application
> variable? In a database? Do you have logout functionality? Need more
> info. Are you using global.asa with a SEssion_OnEnd to change the flag,
> wherever that may be?
>
> Ray at work
>
>
> "Mikael Hellström" <micke.hellstrom@telia.com> wrote in message
> news:yLWec.89628$dP1.267882@newsc.telia.net...
> > Hi,
> > I have a site with a lot off online users. I have a special frame that
> show
> > all logged in members and i update this frame in a minute intervall to
> > catch any mewly logged in members.
> >
> > My problem is...i use a session time out set to 20 minutes. But the
> session
> > never dies. This must be a side effect off the timer i use.
> >
> > How can i solve this problem? Any suggestion? I must kill session if the
> > member leaves without logg out.
> >
> > Regards Mikael
> >
> >
>
>



Re: hi, i have some problem with session by Ray

Ray
Tue Apr 13 14:38:08 CDT 2004

If you refresh the page every minute, and the person falls asleep, he will
remain logged in. Because, every time that page is refreshed, that
reaffirms his continued session. How can you get around this? You could
not use sessions and just use only your "session" tracking that you're using
in your SQL database. You'd want to keep track of the time of his last
action in the database then so that you can tell when someone should be
logged out automatically. Then have a job that runs in SQL to clear out
"sessions" that haven't been used in over 20 minutes.

Ray at work

"Mikael Hellström" <micke.hellstrom@telia.com> wrote in message
news:xbXec.55954$mU6.232153@newsb.telia.net...
> Hi, more info...
> I track the on-line user in a database (sql-server 2000).
> When the loggen in user press loggout button i call session.abandon.
>
> In my global.asp i have code in (Session_OnEnd )that delete the user from
> the data base.
> Before i use the timer the system worked soo fine. When the people fall a
> sleep he automatic
> where deleted from db.
>
> This system works great for me until i started to use the timer to update
my
> online list.
> The update system with the timer is ruin everything here...
>
> Question. How can i solve this on some way??
>
> Regards Mikael
>
>
>
> "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
> message news:%23Lf5AsYIEHA.3664@TK2MSFTNGP11.phx.gbl...
> > How are you tracking the list of users logged in? In an application
> > variable? In a database? Do you have logout functionality? Need more
> > info. Are you using global.asa with a SEssion_OnEnd to change the flag,
> > wherever that may be?
> >
> > Ray at work
> >
> >
> > "Mikael Hellström" <micke.hellstrom@telia.com> wrote in message
> > news:yLWec.89628$dP1.267882@newsc.telia.net...
> > > Hi,
> > > I have a site with a lot off online users. I have a special frame that
> > show
> > > all logged in members and i update this frame in a minute intervall to
> > > catch any mewly logged in members.
> > >
> > > My problem is...i use a session time out set to 20 minutes. But the
> > session
> > > never dies. This must be a side effect off the timer i use.
> > >
> > > How can i solve this problem? Any suggestion? I must kill session if
the
> > > member leaves without logg out.
> > >
> > > Regards Mikael
> > >
> > >
> >
> >
>
>



Re: hi, i have some problem with session by Mikael

Mikael
Wed Apr 14 01:44:09 CDT 2004

Hi,
Could this work?


When the user logged in and every move he takes i set

session("last_move")=now()



Then in the frame with timer i run this code

if timeDiff(session("last_move") , now() )>20 then
session.abandon
end if

Regards mikael




"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:eEYZZ7YIEHA.3432@tk2msftngp13.phx.gbl...
> If you refresh the page every minute, and the person falls asleep, he will
> remain logged in. Because, every time that page is refreshed, that
> reaffirms his continued session. How can you get around this? You could
> not use sessions and just use only your "session" tracking that you're
using
> in your SQL database. You'd want to keep track of the time of his last
> action in the database then so that you can tell when someone should be
> logged out automatically. Then have a job that runs in SQL to clear out
> "sessions" that haven't been used in over 20 minutes.
>
> Ray at work
>
> "Mikael Hellström" <micke.hellstrom@telia.com> wrote in message
> news:xbXec.55954$mU6.232153@newsb.telia.net...
> > Hi, more info...
> > I track the on-line user in a database (sql-server 2000).
> > When the loggen in user press loggout button i call session.abandon.
> >
> > In my global.asp i have code in (Session_OnEnd )that delete the user
from
> > the data base.
> > Before i use the timer the system worked soo fine. When the people fall
a
> > sleep he automatic
> > where deleted from db.
> >
> > This system works great for me until i started to use the timer to
update
> my
> > online list.
> > The update system with the timer is ruin everything here...
> >
> > Question. How can i solve this on some way??
> >
> > Regards Mikael
> >
> >
> >
> > "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
> > message news:%23Lf5AsYIEHA.3664@TK2MSFTNGP11.phx.gbl...
> > > How are you tracking the list of users logged in? In an application
> > > variable? In a database? Do you have logout functionality? Need
more
> > > info. Are you using global.asa with a SEssion_OnEnd to change the
flag,
> > > wherever that may be?
> > >
> > > Ray at work
> > >
> > >
> > > "Mikael Hellström" <micke.hellstrom@telia.com> wrote in message
> > > news:yLWec.89628$dP1.267882@newsc.telia.net...
> > > > Hi,
> > > > I have a site with a lot off online users. I have a special frame
that
> > > show
> > > > all logged in members and i update this frame in a minute intervall
to
> > > > catch any mewly logged in members.
> > > >
> > > > My problem is...i use a session time out set to 20 minutes. But the
> > > session
> > > > never dies. This must be a side effect off the timer i use.
> > > >
> > > > How can i solve this problem? Any suggestion? I must kill session if
> the
> > > > member leaves without logg out.
> > > >
> > > > Regards Mikael
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: hi, i have some problem with session by Steven

Steven
Wed Apr 14 02:00:50 CDT 2004

Use Time() instead of Now()

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)


Mikael Hellström <micke.hellstrom@telia.com> wrote in message
news:Z45fc.89661$dP1.268149@newsc.telia.net...
> Hi,
> Could this work?
>
>
> When the user logged in and every move he takes i set
>
> session("last_move")=now()
>
>
>
> Then in the frame with timer i run this code
>
> if timeDiff(session("last_move") , now() )>20 then
> session.abandon
> end if
>
> Regards mikael
>
>
>
>
> "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
> message news:eEYZZ7YIEHA.3432@tk2msftngp13.phx.gbl...
> > If you refresh the page every minute, and the person falls asleep, he
will
> > remain logged in. Because, every time that page is refreshed, that
> > reaffirms his continued session. How can you get around this? You
could
> > not use sessions and just use only your "session" tracking that you're
> using
> > in your SQL database. You'd want to keep track of the time of his last
> > action in the database then so that you can tell when someone should be
> > logged out automatically. Then have a job that runs in SQL to clear out
> > "sessions" that haven't been used in over 20 minutes.
> >
> > Ray at work
> >
> > "Mikael Hellström" <micke.hellstrom@telia.com> wrote in message
> > news:xbXec.55954$mU6.232153@newsb.telia.net...
> > > Hi, more info...
> > > I track the on-line user in a database (sql-server 2000).
> > > When the loggen in user press loggout button i call session.abandon.
> > >
> > > In my global.asp i have code in (Session_OnEnd )that delete the user
> from
> > > the data base.
> > > Before i use the timer the system worked soo fine. When the people
fall
> a
> > > sleep he automatic
> > > where deleted from db.
> > >
> > > This system works great for me until i started to use the timer to
> update
> > my
> > > online list.
> > > The update system with the timer is ruin everything here...
> > >
> > > Question. How can i solve this on some way??
> > >
> > > Regards Mikael
> > >
> > >
> > >
> > > "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
> > > message news:%23Lf5AsYIEHA.3664@TK2MSFTNGP11.phx.gbl...
> > > > How are you tracking the list of users logged in? In an application
> > > > variable? In a database? Do you have logout functionality? Need
> more
> > > > info. Are you using global.asa with a SEssion_OnEnd to change the
> flag,
> > > > wherever that may be?
> > > >
> > > > Ray at work
> > > >
> > > >
> > > > "Mikael Hellström" <micke.hellstrom@telia.com> wrote in message
> > > > news:yLWec.89628$dP1.267882@newsc.telia.net...
> > > > > Hi,
> > > > > I have a site with a lot off online users. I have a special frame
> that
> > > > show
> > > > > all logged in members and i update this frame in a minute
intervall
> to
> > > > > catch any mewly logged in members.
> > > > >
> > > > > My problem is...i use a session time out set to 20 minutes. But
the
> > > > session
> > > > > never dies. This must be a side effect off the timer i use.
> > > > >
> > > > > How can i solve this problem? Any suggestion? I must kill session
if
> > the
> > > > > member leaves without logg out.
> > > > >
> > > > > Regards Mikael
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: hi, i have some problem with session by PW

PW
Wed Apr 14 02:04:56 CDT 2004



I saw this global.asa example on the web somewhere a long time ago. Its
been working fine for me.

<script language=VBScript runat=Server>
Sub Application_OnStart
Application("active") = 0
End Sub
Sub Application_OnEnd
'---nothing here
End Sub
Sub Session_OnStart
Session.Timeout = 20
'---lock Application variable before updating
Application.Lock
Application("active") = Application("active") + 1
Application.Unlock
End Sub
Sub Session_OnEnd
Application.Lock
Application("active") = Application("active") - 1
Application.Unlock
End Sub
</script>