create iis pool programmatically c# code example
Example: create iis pool programmatically c#
private static void CreateAppPool(string poolname,bool enable32bitOn64, ManagedPipelineMode mode,string runtimeVersion="v4.0")
{
using (ServerManager serverManager = new ServerManager())
{
ApplicationPool newPool = serverManager.ApplicationPools.Add(poolname);
newPool.ManagedRuntimeVersion = runtimeVersion;
newPool.Enable32BitAppOnWin64 = true;
newPool.ManagedPipelineMode = mode;
serverManager.CommitChanges();
}
}