using System;
using Microsoft.Web.Administration;
class Program
{
static void Main(string[] args)
{
ServerManager mgr = new ServerManager();
ApplicationPool myAppPool = mgr.ApplicationPools.Add("MyAppPool");
myAppPool.AutoStart = true;
myAppPool.Cpu.Action = ProcessorAction.KillW3wp;
myAppPool.ManagedPipelineMode = ManagedPipelineMode.Integrated;
myAppPool.ManagedRuntimeVersion = "V2.0";
myAppPool.ProcessModel.IdentityType = ProcessModelIdentityType.NetworkService;
myAppPool.ProcessModel.IdleTimeout = TimeSpan.FromMinutes(2);
myAppPool.ProcessModel.MaxProcesses = 1;
mgr.CommitChanges();
}
}
using Microsoft.Web.Administration;
class Program
{
static void Main(string[] args)
{
ServerManager mgr = new ServerManager();
ApplicationPool myAppPool = mgr.ApplicationPools.Add("MyAppPool");
myAppPool.AutoStart = true;
myAppPool.Cpu.Action = ProcessorAction.KillW3wp;
myAppPool.ManagedPipelineMode = ManagedPipelineMode.Integrated;
myAppPool.ManagedRuntimeVersion = "V2.0";
myAppPool.ProcessModel.IdentityType = ProcessModelIdentityType.NetworkService;
myAppPool.ProcessModel.IdleTimeout = TimeSpan.FromMinutes(2);
myAppPool.ProcessModel.MaxProcesses = 1;
mgr.CommitChanges();
}
}