Results 1 to 4 of 4

Thread: [2005] Application_End never runs

  1. #1

    Thread Starter
    Hyperactive Member anna7's Avatar
    Join Date
    Sep 2005
    Location
    Catalonia
    Posts
    481

    Exclamation [2005] Application_End never runs

    Hi,

    I must execute a procedures (delete temporal data) when the application ends, but the event "Application_End" never runs. Why?

    Is there other alternative?

    regards

  2. #2
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: [2005] Application_End never runs

    Some of the other gurus, please correct me if I'm wrong, but Application_End is not likely to run that often. I believe the Application only ends if the server is shut down for whatever reason, and when the server restarts, the application starts again the first time a user hits it. After that, it just keeps running until something on the server shuts it down.

  3. #3
    Hyperactive Member kayos's Avatar
    Join Date
    Apr 2004
    Location
    Largo, Florida
    Posts
    306

    Re: [2005] Application_End never runs

    you should keep in mind the scope of the variables you are killing.

    the Application_OnEnd event only runs when the web is shut down for whatever reason.

    the Session_OnEnd however, runs each time a user leaves your website.

    the thing about it is that .NET has garbage collection that will kill off your variables at the end of their scope anyways, so if you aren't sure you can just let the .NET gc handle it for now.


    If this post helps, please RATE MY POST!

    Using Visual Studio 2005 SE

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Application_End never runs

    It seems like you want to delete the data when the page execution is complete, yes? If so, then use Application_EndRequest.

    Otherwise, go into more detail about what sort of data you are temporarily storing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width