in C#/Powershell - Is it possible to change the Idle TimeOut for an IIS Application Pool?

前端 未结 8 525
别那么骄傲
别那么骄傲 2021-02-05 08:29

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?

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-05 09:07

    When using powershell use the following:

    $appPoolName = "xxxAppPool"
    &"$env:windir\system32\inetsrv\appcmd" set APPPOOL $appPoolName /processModel.idleTimeout:0.00:00:00
    

提交回复
热议问题