简体   繁体   中英

When an application pool is recycled in IIS, is the Application_End called?

I have some clean up stuff in Application_End method in Global.asax. When an application pool is recycled in IIS, is the Application_End called? or do I need to place the clean up code in any other function?

One thing is certain dispose gets called before Applicaion_End. After adding logging to Application_End to show you that it does indeed get called by recycle, see what happens when you add an infinite loop to dispose. Does End get called?

You should also note that Application_End gets is supposed to be called when ever the AppDomain gets unloaded. This includes things like web.config changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM