Is there a way to configure the Application Pool's "Idle timeout" in web.config?

Martin Kool picture Martin Kool · Mar 9, 2009 · Viewed 13k times · Source

I know one can set the session timeout. But, if the application itself has received no requests for a given period of time, IIS shuts down the application.

This behavior is configurable in the IIS management console, and I know how to do this. Still, I wonder if it is possible to configure this in web.config.

Answer

Christopher G. Lewis picture Christopher G. Lewis · Mar 9, 2009

Not in IIS 6. In IIS 6, Application Pools are controlled by Worker Processes, which map to a Request Queue handled by HTTP.sys. HTTP.sys handles the communication with the WWW Server to determine when to start and stop Worker Processes.

Since IIS 6 was created before .Net, there's no communication hooks between .Net and the low-level http handlers.

ASP.net is implimented as an ISAPI filter, which is loaded by the Worker Process itself. You have a chicken-before-the-egg issue if you are looking at the web.config controlling a worker process. This is primarily why MS did the major re-write of IIS 7 which integrates .Net through the entire request life-cycle, not just the ISAPI filter portion.