IIS 7 and Above
IIS Application Initialization after site restart
Last post Jan 29, 2018 08:12 AM by Yuk Ding
Jan 26, 2018 08:09 AM|kristofdc|LINK
We are developing a web API (owin/.NET 4.5.2) with job scheduler (Quartz.NET) functionality which need to run always without recycling and needs to boot up from the early beginning. So we configured our IIS 8 app and app pool to use application initialization
(preload data, AlwaysRunning, idle time 0).
Application initialization just works fine when we start/stop/restart the application pool. If we only start/stop/restart our IIS site, the application initialization is not working. The first request will execute the logic.
Why does IIS does not trigger the application initialization after site restart and how can we achieve that goal?
Jan 29, 2018 08:12 AM|Yuk Ding|LINK
Just keep in mind that stop IIS site will not kill the IIS worker process. If you check the prcess ID in task manager, you will see it is not changed. The worker process will get killed by the idle time out. However, if you set the idle time out to 0, then
it will not kill the process any more. So if you need to let the application initialization get work, please kill the w3wp.exe in task manager manually.