Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > global.asa - code outside Subs

Reply
Thread Tools

global.asa - code outside Subs

 
 
Guest
Posts: n/a
 
      12-30-2003
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?


 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      12-30-2003
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:(E-Mail Removed)...
> 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?
>
>



 
Reply With Quote
 
 
 
 
Foo Man Chew
Guest
Posts: n/a
 
      12-30-2003
> 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)?


 
Reply With Quote
 
Guest
Posts: n/a
 
      12-30-2003
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:(E-Mail Removed)...
> 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?
>
>



 
Reply With Quote
 
Guest
Posts: n/a
 
      12-30-2003
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:(E-Mail Removed)...
> 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:(E-Mail Removed)...
> > 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?
> >
> >

>
>



 
Reply With Quote
 
Guest
Posts: n/a
 
      12-30-2003
Not sure.
You seem to mean Session OnEnd, whereas I mean Application OnEnd

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:(E-Mail Removed)...
> 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:OJgH3$(E-Mail Removed)...
> > 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:(E-Mail Removed)...
> > > 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:(E-Mail Removed)...
> > > > 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?
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      12-30-2003
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:OJgH3$(E-Mail Removed)...
> 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:(E-Mail Removed)...
> > 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:(E-Mail Removed)...
> > > 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?
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      12-30-2003
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:(E-Mail Removed)...
> Not sure.
> You seem to mean Session OnEnd, whereas I mean Application OnEnd
>
> "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> news:(E-Mail Removed)...
> > 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:OJgH3$(E-Mail Removed)...
> > > 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:(E-Mail Removed)...
> > > > 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:(E-Mail Removed)...
> > > > > 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?
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Guest
Posts: n/a
 
      12-31-2003
Never mind, Curt. What about my original query?

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:(E-Mail Removed)...
> 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:(E-Mail Removed)...
> > Not sure.
> > You seem to mean Session OnEnd, whereas I mean Application OnEnd
> >
> > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > news:(E-Mail Removed)...
> > > 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:OJgH3$(E-Mail Removed)...
> > > > 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:(E-Mail Removed)...
> > > > > 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:(E-Mail Removed)...
> > > > > > 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?
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
outside type, outside function Krzysztof Poc C++ 1 02-07-2012 04:06 PM
Pix 506e w/5 static outside IPs - How to create a rule to allow ALL tcp/udp traffic from one outside IP to an internal IP (for an internal router/NAT with it's own subnet) kyoo Cisco 22 04-12-2008 03:37 PM
help with pix inside->outside + dmz->outside + inside->outside->dmz Jack Cisco 0 09-19-2007 01:57 AM
CallForward outside->inside->outside failed after one ring. Yogz Cisco 1 04-16-2007 03:58 PM
nat from outside to outside dt1649651@yahoo.com Cisco 1 08-21-2005 04:26 PM



Advertisments