global.asa - code outside Subs

Discussion in 'ASP General' started by Guest, Dec 30, 2003.

  1. Guest

    Guest Guest

    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?
     
    Guest, Dec 30, 2003
    #1
    1. Advertising

  2. Guest

    Curt_C [MVP] Guest

    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:...
    > 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?
    >
    >
     
    Curt_C [MVP], Dec 30, 2003
    #2
    1. Advertising

  3. Guest

    Foo Man Chew Guest

    > 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)?
     
    Foo Man Chew, Dec 30, 2003
    #3
  4. Guest

    Guest Guest

    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:...
    > 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?
    >
    >
     
    Guest, Dec 30, 2003
    #4
  5. Guest

    Guest Guest

    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:...
    > 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:...
    > > 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?
    > >
    > >

    >
    >
     
    Guest, Dec 30, 2003
    #5
  6. Guest

    Guest Guest

    Not sure.
    You seem to mean Session OnEnd, whereas I mean Application OnEnd

    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:...
    > 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$...
    > > 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:...
    > > > 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:...
    > > > > 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?
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Guest, Dec 30, 2003
    #6
  7. Guest

    Curt_C [MVP] Guest

    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$...
    > 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:...
    > > 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:...
    > > > 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?
    > > >
    > > >

    > >
    > >

    >
    >
     
    Curt_C [MVP], Dec 30, 2003
    #7
  8. Guest

    Curt_C [MVP] Guest

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

    > >
    > >

    >
    >
     
    Curt_C [MVP], Dec 30, 2003
    #8
  9. Guest

    Guest Guest

    Never mind, Curt. What about my original query?

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

    > >
    > >

    >
    >
     
    Guest, Dec 31, 2003
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darlene Gauthier

    PostRequestHandlerExecute event in global.asa

    Darlene Gauthier, Jul 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,426
    Karl Seguin
    Jul 23, 2003
  2. Kevin Spencer

    Re: global.asa file (count sessions)

    Kevin Spencer, Jul 30, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    354
    Kevin Spencer
    Jul 30, 2003
  3. DevBoy

    Global.asa File ?????

    DevBoy, Aug 12, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    359
    Rick Strahl [MVP]
    Aug 13, 2003
  4. Wayne
    Replies:
    2
    Views:
    476
    Wayne
    Nov 11, 2003
  5. Krzysztof Poc

    outside type, outside function

    Krzysztof Poc, Feb 3, 2012, in forum: C++
    Replies:
    1
    Views:
    290
    Victor Bazarov
    Feb 7, 2012
Loading...

Share This Page