I want to disable the idle timeout (Set it to Zero) of an application pool and I want to perform this at setup time, is it possible to perform this action from C# or PowerShell?
This is the script that i decided to use:
$myApplicationPool = Get-WmiObject -Class IISApplicationPoolSetting -Namespace "root\microsoftiisv2" | Where-Object {$_.Name -eq 'W3SVC/APPPOOLS/DefaultAppPool'}
$myApplicationPool.IdleTimeout=0
$myApplicationPool.Put()
If someone else has a better approach for this please let me know.
Hope this help someone
Regards.