473,511 Members | 10,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

global.asa - code outside Subs

In global.asa I have some code outside all the Subs.

I have some confirmation that it is being executed OnStart.
Yet I can's see if it is executed OnEnd.

The literature I have says that OnEnd the Sub Application_OnEnd is executed,
but is does not say that anything else is executed

Actually I even can't understand if global.asa is permited to have any code
outside the Subs

Could someone comment on this?
Jul 19 '05 #1
8 2269
first off, the Application_OnEnd is not reliable....and should not be
counted on.
Beyond that, could you give a specific example of what you are trying to do?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<aa> wrote in message news:u2**************@tk2msftngp13.phx.gbl...
In global.asa I have some code outside all the Subs.

I have some confirmation that it is being executed OnStart.
Yet I can's see if it is executed OnEnd.

The literature I have says that OnEnd the Sub Application_OnEnd is executed, but is does not say that anything else is executed

Actually I even can't understand if global.asa is permited to have any code outside the Subs

Could someone comment on this?

Jul 19 '05 #2
> In global.asa I have some code outside all the Subs.

Could you be more specific? What "code" is "outside all the subs"? Could
you show your global.asa? How do you expect it to be executed? How can you
tell it's being executed OnStart (on start of WHAT) and not OnEnd (again, on
end of WHAT)?
Jul 19 '05 #3
Thank you for asking questions

In global.asa outside all the Subs, I define and initiate a variable to
hold a path to a file to which I write something on Application_OnEnd and
read from on Application_OnStart. I use MapPath and do it outside Subs
because MapPath for some reason does not work well inside Application
On_End.

My question is: what is the lifetime of that variable? Does it get lost as
soon the global.asa is executed? Or it is stored somewhere?

From my 2 year experience with nt4/iis it seems that it is either stored
like an Application scope variable or (more likely) this out-of-subs code
gets executed OnEnd as well. This is proven that file in question has been
consistently found and records were read from it OnStart and added to it
OnEnd.

The reason I am asking this question is that I moved to w2k server and there
the impression is that the OnEnd event is not fired at all. The log is
registering the times the application starts, but no traces of application
stops

<aa> wrote in message news:u2**************@tk2msftngp13.phx.gbl...
In global.asa I have some code outside all the Subs.

I have some confirmation that it is being executed OnStart.
Yet I can's see if it is executed OnEnd.

The literature I have says that OnEnd the Sub Application_OnEnd is executed, but is does not say that anything else is executed

Actually I even can't understand if global.asa is permited to have any code outside the Subs

Could someone comment on this?

Jul 19 '05 #4
In which sense is it unreliable?
I have been using is on nt4/iis4 for 2 years now to save page hit counters -
it seemed to work fine.
Saving application variables is one of the most common usage of global.asa
and it relies heavily on OnEnd.
The only unreliability I noticed that it is difficult to tell when exactly
this even is expected to fire. But it looks like it had been firing at the
end of the day.
I keep a log on my provider of server down times recording date and time
when thevapplication end and application start - and it has beed quite
consistent.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uQ*************@TK2MSFTNGP12.phx.gbl...
first off, the Application_OnEnd is not reliable....and should not be
counted on.
Beyond that, could you give a specific example of what you are trying to do?
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<aa> wrote in message news:u2**************@tk2msftngp13.phx.gbl...
In global.asa I have some code outside all the Subs.

I have some confirmation that it is being executed OnStart.
Yet I can's see if it is executed OnEnd.

The literature I have says that OnEnd the Sub Application_OnEnd is

executed,
but is does not say that anything else is executed

Actually I even can't understand if global.asa is permited to have any

code
outside the Subs

Could someone comment on this?


Jul 19 '05 #5
Exactly... most people try to use it for when a person "leaves" the site. As
long as you can wait for the actual session expiration it should work....
They expect the "X" from the browser to fire it, which we all know doesnt'
work

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<aa> wrote in message news:OJ**************@TK2MSFTNGP12.phx.gbl...
In which sense is it unreliable?
I have been using is on nt4/iis4 for 2 years now to save page hit counters - it seemed to work fine.
Saving application variables is one of the most common usage of global.asa
and it relies heavily on OnEnd.
The only unreliability I noticed that it is difficult to tell when exactly
this even is expected to fire. But it looks like it had been firing at the
end of the day.
I keep a log on my provider of server down times recording date and time
when thevapplication end and application start - and it has beed quite
consistent.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uQ*************@TK2MSFTNGP12.phx.gbl...
first off, the Application_OnEnd is not reliable....and should not be
counted on.
Beyond that, could you give a specific example of what you are trying to

do?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<aa> wrote in message news:u2**************@tk2msftngp13.phx.gbl...
In global.asa I have some code outside all the Subs.

I have some confirmation that it is being executed OnStart.
Yet I can's see if it is executed OnEnd.

The literature I have says that OnEnd the Sub Application_OnEnd is

executed,
but is does not say that anything else is executed

Actually I even can't understand if global.asa is permited to have any

code
outside the Subs

Could someone comment on this?



Jul 19 '05 #6
Not sure.
You seem to mean Session OnEnd, whereas I mean Application OnEnd

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uZ*************@tk2msftngp13.phx.gbl...
Exactly... most people try to use it for when a person "leaves" the site. As long as you can wait for the actual session expiration it should work....
They expect the "X" from the browser to fire it, which we all know doesnt'
work

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<aa> wrote in message news:OJ**************@TK2MSFTNGP12.phx.gbl...
In which sense is it unreliable?
I have been using is on nt4/iis4 for 2 years now to save page hit

counters -
it seemed to work fine.
Saving application variables is one of the most common usage of global.asa and it relies heavily on OnEnd.
The only unreliability I noticed that it is difficult to tell when exactly this even is expected to fire. But it looks like it had been firing at the end of the day.
I keep a log on my provider of server down times recording date and time
when thevapplication end and application start - and it has beed quite
consistent.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uQ*************@TK2MSFTNGP12.phx.gbl...
first off, the Application_OnEnd is not reliable....and should not be
counted on.
Beyond that, could you give a specific example of what you are trying to
do?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<aa> wrote in message news:u2**************@tk2msftngp13.phx.gbl...
> In global.asa I have some code outside all the Subs.
>
> I have some confirmation that it is being executed OnStart.
> Yet I can's see if it is executed OnEnd.
>
> The literature I have says that OnEnd the Sub Application_OnEnd is
executed,
> but is does not say that anything else is executed
>
> Actually I even can't understand if global.asa is permited to have

any code
> outside the Subs
>
> Could someone comment on this?
>
>



Jul 19 '05 #7
My bad... I mis-read it. It's been that type of day....

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<aa> wrote in message news:Ou**************@TK2MSFTNGP10.phx.gbl...
Not sure.
You seem to mean Session OnEnd, whereas I mean Application OnEnd

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uZ*************@tk2msftngp13.phx.gbl...
Exactly... most people try to use it for when a person "leaves" the site.
As
long as you can wait for the actual session expiration it should work.... They expect the "X" from the browser to fire it, which we all know doesnt' work

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<aa> wrote in message news:OJ**************@TK2MSFTNGP12.phx.gbl...
In which sense is it unreliable?
I have been using is on nt4/iis4 for 2 years now to save page hit counters -
it seemed to work fine.
Saving application variables is one of the most common usage of

global.asa and it relies heavily on OnEnd.
The only unreliability I noticed that it is difficult to tell when exactly this even is expected to fire. But it looks like it had been firing at the end of the day.
I keep a log on my provider of server down times recording date and time when thevapplication end and application start - and it has beed quite
consistent.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uQ*************@TK2MSFTNGP12.phx.gbl...
> first off, the Application_OnEnd is not reliable....and should not be > counted on.
> Beyond that, could you give a specific example of what you are
trying to do?
>
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> www.Darkfalz.com
>
>
> <aa> wrote in message news:u2**************@tk2msftngp13.phx.gbl...
> > In global.asa I have some code outside all the Subs.
> >
> > I have some confirmation that it is being executed OnStart.
> > Yet I can's see if it is executed OnEnd.
> >
> > The literature I have says that OnEnd the Sub Application_OnEnd is
> executed,
> > but is does not say that anything else is executed
> >
> > Actually I even can't understand if global.asa is permited to have any > code
> > outside the Subs
> >
> > Could someone comment on this?
> >
> >
>
>



Jul 19 '05 #8
Never mind, Curt. What about my original query?

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:eS**************@TK2MSFTNGP12.phx.gbl...
My bad... I mis-read it. It's been that type of day....

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<aa> wrote in message news:Ou**************@TK2MSFTNGP10.phx.gbl...
Not sure.
You seem to mean Session OnEnd, whereas I mean Application OnEnd

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uZ*************@tk2msftngp13.phx.gbl...
Exactly... most people try to use it for when a person "leaves" the site.
As
long as you can wait for the actual session expiration it should work.... They expect the "X" from the browser to fire it, which we all know doesnt' work

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<aa> wrote in message news:OJ**************@TK2MSFTNGP12.phx.gbl...
> In which sense is it unreliable?
> I have been using is on nt4/iis4 for 2 years now to save page hit
counters -
> it seemed to work fine.
> Saving application variables is one of the most common usage of

global.asa
> and it relies heavily on OnEnd.
> The only unreliability I noticed that it is difficult to tell when

exactly
> this even is expected to fire. But it looks like it had been firing at the
> end of the day.
> I keep a log on my provider of server down times recording date and time > when thevapplication end and application start - and it has beed
quite > consistent.
>
>
> "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> news:uQ*************@TK2MSFTNGP12.phx.gbl...
> > first off, the Application_OnEnd is not reliable....and should not be > > counted on.
> > Beyond that, could you give a specific example of what you are

trying
to
> do?
> >
> > --
> > Curt Christianson
> > Owner/Lead Developer, DF-Software
> > www.Darkfalz.com
> >
> >
> > <aa> wrote in message news:u2**************@tk2msftngp13.phx.gbl... > > > In global.asa I have some code outside all the Subs.
> > >
> > > I have some confirmation that it is being executed OnStart.
> > > Yet I can's see if it is executed OnEnd.
> > >
> > > The literature I have says that OnEnd the Sub Application_OnEnd is > > executed,
> > > but is does not say that anything else is executed
> > >
> > > Actually I even can't understand if global.asa is permited to

have any
> > code
> > > outside the Subs
> > >
> > > Could someone comment on this?
> > >
> > >
> >
> >
>
>



Jul 19 '05 #9

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

Similar topics

11
2679
by: mrbog | last post by:
I have an array/hash that stores path information for my app. As in, what directory this is in, what directory that's in, what the name of the site is, what the products are called, etc. It's...
9
2362
by: Tony Johansson | last post by:
Hello! I know it's bad design to use global variables. I just want to ask a question about them. Is global variables and global static variables the same. These are define outside any...
3
1522
by: Andyza | last post by:
In my Global.asa file I have the following 2 subs for opening and closing my db connection: Sub OpenConn() Dim conn Set conn = Server.CreateObject("ADODB.Connection") conn.Open...
22
3728
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to...
4
1499
by: JohnR | last post by:
My situation is that I have a custom user control that I have built into a DLL and put it on the "USER CONTROLS" part of the toolbox, so I can drag it into a form whenever I need it. The problem...
6
1536
by: D. Shane Fowlkes | last post by:
I posted this on another forum, and as I feared, the response(s) were too complex and sophisticated. I certainly don't mind learning new methods, in fact, that's why I asked, but I was hoping to...
1
255
by: Brian Cahill | last post by:
Hello, I am trying to create a variable when my form loads which can be used when I click my buttons. Here is my code. What am I doing wrong? Thanks for any help. Private Sub...
9
8620
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...
1
29312
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
7251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7148
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5072
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3217
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.