Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 100403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:34:22+00:00 2026-05-11T00:34:22+00:00

Is it possible to catch an recycle event in the global.asax? I know Application_End

  • 0

Is it possible to catch an recycle event in the global.asax?

I know Application_End will be triggered but is there a way to know that it was triggered by a recycle of the application pool?

thx, Lieven Cardoen aka Johlero

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:34:23+00:00Added an answer on May 11, 2026 at 12:34 am

    So, here is an idea how this could work.

    Based on my previous answer (attach to AppDomain.CurrentDomain.ProcessExit) and stephbu‘s comment:

    This will trap most structured process teardowns e.g. – but I’m not sure that it will trap all tear downs. e.g. http://blogs.msdn.com/jmstall/archive/2006/11/26/process-exit-event.aspx Process recycle will kill the process if it seems to be hung – your handler wouldn’t get called.

    I suggest following strategy:

    In the (regular) ProcessExit handler (which we suppose will not be called on a application pool recycling), write some file to disk like ‘app_domain_end_ok.tmp‘.

    Then in the Application_Start of your global.asax check for this file. If it doesn’t exist it is a sign that the application was not terminated in a clean way (or that it is the first time ever it started). Don’t forget to delete this file from disk after the check.

    I didn’t try that myself, but it could be worth a try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Catch multiple Exceptions at once? Is there any way in C# to
Is it possible to catch the event that Soft Keyboard was shown or hidden
Is it possible to catch unexpected errors globally in c# WPF application - c#
Is it possible to catch an exception from anywhere in a console app that
Is it possible to catch the uninstall event and execute some code when the
Is it possible to catch and log all JS errors that could happen through
Is it possible to catch the YSOD that occurs from a asp.net app's web.config
It it possible to catch a double right click event in Actionscript 3?
Possible Duplicate: catch exception by pointer in C++ I always catch exceptions by value.
Is possible to catch more then one exception in the same catch block? try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.