当究竟Application_End被调用,我怎么可以手动原因? [英] When exactly does Application_End get called and how can I manually cause this?

查看:575
本文介绍了当究竟Application_End被调用,我怎么可以手动原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,当应用程序池被回收IIS此事件的事件处理程序被调用,而是什么时候发生的呢?那么如果使用内置在Visual Studio服务器(卡西尼)?如果我杀了服务器进程,将Application_End被解雇?

I know that the event handler for this event is called when the application pool is recycled by IIS, but when does that happen? What about if using the built-in Visual Studio server (Cassini)? If I kill the server process, would Application_End be fired?

更新:我知道的web.config和BIN文件夹的变化。我感兴趣的关停池的情况下,应用程序已经闲置了一段时间没有碰任何东西了。

UPDATE: I know about web.config and BIN folder changes. I'm interested in the case of shutting down the pool after the application has been idle for a period of time without touching anything.

推荐答案

像<一个href=\"http://stackoverflow.com/questions/955594/when-exactly-does-applicationend-get-called-and-how-can-i-manually-cause-this/955605#955605\">Nick说,当......一些回收限制砸在应用程序池配置应用程序池回收会。在IIS中可以设置应用程序池中设置回收条件。可以使用以MB固定的时间间隔(每隔X分钟或请求),一天中的特定时间,或者基于存储器的最大值(最大虚拟存储器或最大私人存储器),或任何这些的组合。您还可以设置一个空闲超时在后一个工作进程被终止分钟。

Like Nick said, "An application pool will recycle when... some of the recycle limits are hit on the application pool configuration." In IIS you can set the recycling conditions in the application pool settings. You can use fixed intervals (every X minutes or requests), a specific time of day, or memory-based maximums in MB (max virtual memory or max private memory), or a combination of any of these. You can also set an idle time-out in minutes after which a worker process is terminated.

这篇关于当究竟Application_End被调用,我怎么可以手动原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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