473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Global.asa

Hello there:
My Golbal.asa file isn't firing or working, I put it in the rootdirectory whereall my asp files, my web diectory is set asapplication, I looked throught the internet for similar problembut I am still unable to get it to work. I tried to showapplication variable in asp file by using response.WriteApplication("start") and nothing is showing on the browser.
I am running IIS on windows 2000
Any help is much appreciated. Here is my golbal.asa file:

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">' I do this becauseyou can't use Server.MapPath
' in Session_OnEnd... you'll have to modify this
' to reflect the appropriate path on your server.
Const strLogFilePath = "C:\MyFolderName\session.log"
Sub Application_OnStart
Application("Start") = Now()
End Sub
Sub Session_OnStart
Session.Timeout = 5
Session("Start") = Now()
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " started at" & Now ()
objFile.Close
Set objFile = Nothing
End Sub
Sub Session_OnEnd
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " ended at "& Now ()
objFile.Close
Set objFile = Nothing
End Sub
Sub Application_OnEnd
End Sub
</SCRIPT>
Jul 19 '05 #1
2 3076
Restart the application in IIS and then check the variable. Changing the
global.asa file will show up in new Sessions, but code in
Application_OnStart requires the service actually stop and start.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"Osama Yahya" <os****@lasernetworks.com> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
Hello there:
My Golbal.asa file isn't firing or working, I put it in the root directory
whereall my asp files, my web diectory is set as application, I looked
throught the internet for similar problem but I am still unable to get it to
work. I tried to show application variable in asp file by using
response.Write Application("start") and nothing is showing on the browser.
I am running IIS on windows 2000
Any help is much appreciated. Here is my golbal.asa file:

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">' I do this because you can't use
Server.MapPath
' in Session_OnEnd... you'll have to modify this
' to reflect the appropriate path on your server.
Const strLogFilePath = "C:\MyFolderName\session.log"
Sub Application_OnStart
Application("Start") = Now()
End Sub
Sub Session_OnStart
Session.Timeout = 5
Session("Start") = Now()
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " started at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub
Sub Session_OnEnd
Dim objFSO, objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strLogFilePath, 8, True)
Set objFSO = Nothing
objFile.WriteLine "Session: " & Session.SessionID & " ended at " & Now ()
objFile.Close
Set objFile = Nothing
End Sub
Sub Application_OnEnd
End Sub
</SCRIPT>
Jul 19 '05 #2
Cowboy (Gregory A. Beamer) [MVP] wrote on 18 jun 2004 in
microsoft.public.inetserver.asp.general:
Restart the application in IIS and then check the variable. Changing the
global.asa file will show up in new Sessions, but code in
Application_OnStart requires the service actually stop and start.


Did you try:

<% application.abandon %>

<http://BGonly.microsoft.com/?search=plug_pull_out%20ASP>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: CDMAPoster | last post by:
About a year ago there was a thread about the use of global variables in A97: http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/fedc837a5aeb6157 Best Practices by Kang...
3
by: User1014 | last post by:
A global variable is really just a property of the "Global Object", so what does that make a function defined in the global context? A method of the Global Object? ...
8
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project...
8
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project...
1
weaknessforcats
by: weaknessforcats | last post by:
C++: The Case Against Global Variables Summary This article explores the negative ramifications of using global variables. The use of global variables is such a problem that C++ architects have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.