473,378 Members | 1,133 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,378 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 3081
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.