简体   繁体   中英

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.

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?

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.

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

zimaden provided a pretty useful link

There is also this, I came across It and it touches on System.Web.HttpApplication. "life cycle"

how many times is System.Web.HttpApplication is initialised per process

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