How does IIS/PWS know when a user leaves your site? It doesn't! It just have a
build in timelimit (defaulted to 20 minutes), so if it hasn't got a new request
from that users whit in that timelimt it guesses that the user have left.



"Hadi, Sofyan (IDN)" wrote:

> Thanks atas tanggapanya,
> Isi dari Global.asa saya adalah sebagai berikut :
> Tetapi saat dijalankan variable Applicatopn("Online") selalu bertambah bila
> ada user yang mengakses, tetapi tidak berkurang bila user menutup
> browsernya....
>
> Ada yang salah dimana ya..???
>
> Sub Session_OnStart
>   Application.lock
>   Application("online") = Application("online") + 1
>   Application.unlock
>
>   Application.lock
>   Application("Counter") = Application("Counter") + 1
>   Application.unlock
>   Session.Timeout = 60
>   Session("intDataCount") = 1
>
>   sPath = Request.ServerVariables("PATH_TRANSLATED")
>   sPath = left(sPath, InStrRev(sPath, "\"))
>   dbName2 = sPath & "Questioner.mdb"
>   dbName = sPath & "Portal.mdb"
>   dbName = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & dbName
>
>   Session("dbDriver") = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &
> dbName2
>   Session("dbName") = dbName
>   if request.cookies("NPK")="" then
>     response.redirect "login.html"
>   end if
> End Sub
>
> Sub Session_OnEnd
>   Response.write "Session OnEnd"
>   Application.lock
>   Application("online") = Application("online") - 1
>   Application.unlock
> End Sub
>
> Sofyan Hadi
>
>
>
> --
> Pusing milih POP3 atau web mail? http://mail.telkom.net solusinya
> Berhenti langganan kirim email ke [EMAIL PROTECTED]
> Arsip di http://www.mail-archive.com/[email protected]/


-- 
Pusing milih POP3 atau web mail? http://mail.telkom.net solusinya
Berhenti langganan kirim email ke [EMAIL PROTECTED]
Arsip di http://www.mail-archive.com/[email protected]/

Kirim email ke