简体   繁体   English

IIS回收后,不会调用global.asax

[英]After IIS recycles, global.asax is not called

I have set up my IIS application pool to have a maximum of 5 worker processes, and the application pool will recycle the worker processes every 29 hours. 我已将IIS应用程序池设置为最多具有5个工作进程,并且该应用程序池将每29小时回收一次工作进程。

After it recycles the worker process, the old worker process dies and a new worker process is created. 回收工作进程后,旧工作进程死亡,并创建了新工作进程。 Is it possible for the constructor in the global.asax.cs to get called automatically after a new worker process is created? 创建新的辅助进程后,global.asax.cs中的构造函数是否可以自动调用?

Since there are a maximum of 5 worker processes, I want all 5 worker processes to call their global.asax.cs constructor after it is recycled. 由于最多有5个工作进程,因此我希望所有5个工作进程在回收后都调用其global.asax.cs构造函数。

I have been able to get the constructor of the global.asax.cs to be called when I manually go to the URL in a browser, but was wondering if there was another solution or a IIS property that I have to set 我能够在浏览器中手动转到URL时调用global.asax.cs的构造函数,但是我想知道是否还有其他解决方案或必须设置的IIS属性

zimaden provided a pretty useful link zimaden提供了一个非常有用的链接

There is also this, I came across It and it touches on System.Web.HttpApplication. 还有,我碰到了它,它涉及到System.Web.HttpApplication。 "life cycle" “生命周期”

how many times is System.Web.HttpApplication is initialised per process 每个进程初始化System.Web.HttpApplication多少次

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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