Results 1 to 4 of 4

Thread: Application Ending

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Application Ending

    I have an ASP.NET project created with VB.NET and my Application_End event (in Globals.asax.vb) never fires...When does an application end? Can I do it manually and if so, when should I do so?
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    Re: Application Ending

    Application_End would get called when the last resource of a web application has expired and is cleaned up by the .Net runtime.

    It doesn't get fired anytime some one closes their browser. It does get fired once the last user of a web application's session has expired.

    So if four people continously use a site, the application would never end.

    But, if three left for work, their sessions would expire. The fourth person is the only person then using the application. Once the fourth person leaves, and his session expires (usually 20 mins after last use), then the application will probably be cleaned up by the .net runtime.

    The only way to test this is to manually attach to the aspnet_wp thread.

    Debug - Process - (select aspnet_wp), click Attach. Make sure the Common Language Runtime checkbox is selected and no others. Click OK, then Close the dialog box that appeared.

    Set a breakpoint in your application_end event, then hit your site with your web browser by manually typing the url, wait 20 minutes, and hit should light up.

  3. #3

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: Application Ending

    Thanks very much for your help...but I have the same problem...my application doesn't end. My session timeout is set to 2 minutes.

    I can't think why...
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  4. #4
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Application Ending

    Apparently windows will only clean up memory if it's required.
    So if you have a PC with a decent amount of memory, and only running 1 web site, then it's likely that Application_End will never get fired.

    Why do you want to trap for this event?

    Woka

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