c# : programatically disable IIS AppPool Recycling

using System;
using System.Text;
using Microsoft.Web.Administration;
using System.Linq;

internal static class Sample
{
    private static void Main(string[] args)
    {
        using (ServerManager serverManager = new ServerManager())
        {
            foreach (var ap in serverManager.ApplicationPools)
            {
               ap.Recycling.PeriodicRestart.Time = TimeSpan.Zero;
            }

            serverManager.CommitChanges();
        }
    }
}

Comments

Popular posts from this blog

Resolve "Cannot download packages whilst offline" issue in Deja-Dup backup software

ubuntu 20.04 / netplan / change mac address and static ip

wireshark ssh remote connect on linux server