Asp Session

T

TheOld

Server: Windwos 2000
IIS: 5

Hi,
In my web application the user can't access from more pc in the
site...
Every user have a password that are stores in the session
Every time they enter in the site i check their password in the
session
i handled the session with Application:

This is my global.asa
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Application_OnStart
Application("ActiveUsers")=""
End Sub

Sub Session_OnStart
Session.Timeout = 5
Session("Start") = Now
End Sub

Sub Session_OnEnd
Application.Lock
valori=split(Application("ActiveUsers"),"#")
Application("ActiveUsers")=""
infoutente=Session("utente") & ":" & session.sessionid & ":" &
session("iputente")
for i=0 to (ubound(valori))
if valori(i)<>infoutente and i<>0 then
Application("ActiveUsers")=Application("ActiveUsers") &
"#" & valori(i)
end if
next
Application.UnLock
End Sub

</SCRIPT>

When user left the application with the logout button,
i make a redirect to this page:

<code>
Application.Lock

valori=split(Application("ActiveUsers"),"#")
infoutente=trim(Session("utente"))
if infoutente<>"" then
Application("ActiveUsers")=""
for i=1 to (ubound(valori))
if valori(i)<>infoutente then
Application("ActiveUsers")=Application("ActiveUsers") & "#" &
valori(i)
end if
next
end if

Application.UnLock

Session.Abandon
</code>

if the user doesn't use the logout button my global.asa delete
the user session

this work until the user that are in my site are 140/150,
but from the user are >180 this system doesn't work!

the session doesn't close after 5 minutes!
why?

thenk you and sorry for may english!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top