Legt einen neuen ApplikationPool an. Auf 64bit Systemen ermöglicht es die Ausführun
/// <summary>
/// Updated or creates the application pool for classic .net 4.
/// </summary>
/// <param name = "poolName">Name of the pool.</param>
public void SetPool(string poolName)
{
using (var serverManager = new ServerManager())
{
var pool = serverManager.ApplicationPools.FirstOrDefault(p => p.Name == poolName) ?? serverManager.ApplicationPools.Add(poolName);
pool.ManagedPipelineMode = ManagedPipelineMode.Classic;
pool.AutoStart = true;
if (Environment.Is64BitOperatingSystem)
pool.Enable32BitAppOnWin64 = true;
pool.ManagedRuntimeVersion = "v4.0";
pool.ProcessModel.IdentityType = ProcessModelIdentityType.NetworkService;
serverManager.CommitChanges();
}
}
Kommentare zum Snippet