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?
Get Application Pool Configuration (For Reference)
$appPoolName = 'MyAppPoolName'
$appPoolPath = '/system.applicationHost/applicationPools/Add[@name="' + $appPoolName + '"]//.'
Get-WebConfiguration $appPoolPath -PSPATH iis:
Set Application Pool Idle Timeout
$appPoolName = 'MyAppPoolName'
$appPoolPath = '/system.applicationHost/applicationPools/Add[@name="' + $appPoolName + '"]/processModel'
Set-WebConfigurationProperty $appPoolPath -Name idleTimeout -value ([TimeSpan]::FromMinutes(0)) -PSPATH iis: