Application_End global.asax [英] Application_End global.asax

查看:189
本文介绍了Application_End global.asax的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在应用程序的生命周期中触发Application_End时,有人可以告诉我吗?当所有会话结束时,Application_End会自动触发吗? +还有其他原因可以触发Application_End吗?

Can anybody tell me when Application_End is triggered in a lifecycle of an application? When all sessions are ended, will Application_End be triggered automatically? + Are there any other reasons why Application_End could be triggered?

推荐答案

application_end 事件主要在IIS池被回收或应用程序本身被卸载时触发。另外需要注意的是,对依赖文件(例如web.config)的更改将导致应用程序自行重新加载,这将导致application_end事件在关闭时自动触发。

The application_end event primarily fires when the IIS pool is recycled or the application itself is unloaded. One other thing to note, that a change to a dependent file (say web.config) will cause the application to reload itself, which will in cause the application_end event to fire while it is closing itself off.

需要注意的是,我发现在最后一次用户会话超时时发现的应用程序结束事件的唯一实例是2001年的一些旧文档。我不确定该标准是否仍适用。

To note, the only instance I found of the application end event firing when the last user session times out is in some old documentation dated 2001. I'm not sure if that criteria still applies.

这篇关于Application_End global.asax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆