ASp Session

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TheOld

    #1

    ASp Session

    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="VBScr ipt" RUNAT="Server">

    Sub Application_OnS tart
    Application("Ac tiveUsers")=""
    End Sub

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

    Sub Session_OnEnd
    Application.Loc k
    valori=split(Ap plication("Acti veUsers"),"#")
    Application("Ac tiveUsers")=""
    infoutente=Sess ion("utente") & ":" & session.session id & ":" &
    session("iputen te")
    for i=0 to (ubound(valori) )
    if valori(i)<>info utente and i<>0 then
    Application("Ac tiveUsers")=App lication("Activ eUsers") &
    "#" & valori(i)
    end if
    next
    Application.UnL ock
    End Sub

    </SCRIPT>

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

    <code>
    Application.Loc k

    valori=split(Ap plication("Acti veUsers"),"#")
    infoutente=trim (Session("utent e"))
    if infoutente<>"" then
    Application("Ac tiveUsers")=""
    for i=1 to (ubound(valori) )
    if valori(i)<>info utente then
    Application("Ac tiveUsers")=App lication("Activ eUsers") & "#" &
    valori(i)
    end if
    next
    end if

    Application.UnL ock

    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!

Working...