What causes Application_End?

Discussion in 'ASP .Net' started by Philipp Schumann, Apr 23, 2004.

  1. In one of my web developments, the Application_End event occurs several
    times while a user browses the pages. Because I make use of extensive
    session tracking and also provide a couple of services that need the session
    state, that is highly problematic as the sessions are abandoned when the
    application ends. I have observed this behaviour for quite a while now,
    locally as well as on the web, so it must be due to some of my code.

    Is there any documentation around what exactly causes the ASPX application
    to be restarted, other than a server re-start? Has anyone experienced
    similar problems, or otherwise any kind of clue that might help? I've had a
    hint from someone, saying that "rather critical errors" could provoke such
    behaviour. However, detailed information (as to what kind of error) would be
    good as I have no idea what in my code that could be, nor when it started to
    behave like it.

    Additional info:

    Read-Write-Access MDB database
    Read-Write Access in a couple of directories
    Temporary image files are generated on each request

    Although this seems to be a code-related error, I can report that the
    Application_Error event does not occur.

    I'm looking forward to hearing your ideas.
    Best,
    Philipp Schumann
    Philipp Schumann, Apr 23, 2004
    #1
    1. Advertising

  2. Sometimes a virus scanner will cause this as the application will be
    restarted if it thinks that the web.config file has changed. You may also
    want to make sure that the sessions aren't abandoning first because if all
    the sessions are abandoned and no sessions are active any longer then the
    application will call the End event to clean up until the next session is
    launched. You might try dumping some info to the trace log from the
    global.asax (using the HttpContext.Current.Trace object) as that might let
    you see some timing of events going on that may appear odd, like the
    Sessions ending prematurely, such as at the end of a page.

    Hope this helps,
    Mark Fitzpatrick
    Microsoft MVP - FrontPage

    "Philipp Schumann" <> wrote in message
    news:...
    > In one of my web developments, the Application_End event occurs several
    > times while a user browses the pages. Because I make use of extensive
    > session tracking and also provide a couple of services that need the

    session
    > state, that is highly problematic as the sessions are abandoned when the
    > application ends. I have observed this behaviour for quite a while now,
    > locally as well as on the web, so it must be due to some of my code.
    >
    > Is there any documentation around what exactly causes the ASPX application
    > to be restarted, other than a server re-start? Has anyone experienced
    > similar problems, or otherwise any kind of clue that might help? I've had

    a
    > hint from someone, saying that "rather critical errors" could provoke such
    > behaviour. However, detailed information (as to what kind of error) would

    be
    > good as I have no idea what in my code that could be, nor when it started

    to
    > behave like it.
    >
    > Additional info:
    >
    > Read-Write-Access MDB database
    > Read-Write Access in a couple of directories
    > Temporary image files are generated on each request
    >
    > Although this seems to be a code-related error, I can report that the
    > Application_Error event does not occur.
    >
    > I'm looking forward to hearing your ideas.
    > Best,
    > Philipp Schumann
    >
    >
    Mark Fitzpatrick, Apr 23, 2004
    #2
    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. Jim Owen

    Global.asax Application_End questions

    Jim Owen, Jul 3, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    1,987
    Jim Owen
    Jul 3, 2003
  2. Halcyon Woodward
    Replies:
    3
    Views:
    1,005
    Halcyon Woodward
    Jul 16, 2003
  3. noname

    Re: Application_End

    noname, Jul 16, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    393
    noname
    Jul 16, 2003
  4. Denon

    How to trigger application_end?

    Denon, Nov 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    725
    news.arcor.de
    Nov 8, 2003
  5. Xavier Osa
    Replies:
    0
    Views:
    630
    Xavier Osa
    Jan 9, 2004
Loading...

Share This Page