Results 1 to 2 of 2

Thread: global.asa

  1. #1
    Join Date
    Dec 1969

    Default global.asa

    Dear all, <BR>I need some help urgently about the Application_OnStart thing in the global.asa<BR><BR>I have written the following in the global.asa<BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR><BR>Sub Application_OnStart <BR>Application("Visits") = "0"<BR>Application("Active") = "0"<BR>End Sub<BR><BR>Sub Session_OnStart<BR> If Application("Visits") = "" Then<BR> Application.lock<BR> Application("Visits") = "0"<BR> Application.unlock<BR> End if<BR> If Application("Active") = "" Then<BR> Application.lock<BR> Application("Active") = "0"<BR> Application.unlock <BR> End if<BR><BR> Session("Start") = CStr(Now)<BR> <BR> Application.lock<BR> Application("visits") = CStr(Int(Application("visits")) + 1)<BR> intTotal_visitors = Int(Application("visits"))<BR> Application.unlock<BR> <BR> Session("VisitorID") = CStr(intTotal_visitors)<BR> <BR> Application.lock<BR> Application("Active") = CStr(Int(Application("Active")) + 1)<BR> Application.unlock<BR>End Sub<BR><BR>Sub Session_OnEnd<BR> Dim luser_id<BR> <BR> luser_id = Session("user_id")<BR> Application.lock<BR> Application("user_" + luser_id) = ""<BR> Application("Active") = CStr(Int(Application("Active")) - 1)<BR> Application.unlock<BR>End Sub<BR>&#060;/SCRIPT&#062;<BR><BR>But while I use the browser to access the page(s) I cannot get the Application("Visits") or basically all the application variables... What have I done wrong?

  2. #2
    Join Date
    Dec 1969

    Default RE: global.asa

    If you&#039re using IIS, make sure that your root directory is correctly configured as a virtual directory or else IIS won&#039t read your global.asa file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts