/// <summary> /// Removes the pool from IIS /// </summary> public void Remove() { try { ApplicationPool poolToDelete = this.serverManager.ApplicationPools[this.Name]; poolToDelete.Delete(); this.serverManager.CommitChanges(); } catch (Exception ex) { Trace.TraceError("Exception occured while removing application pool: {0}. The exception thrown was {1}", this.Name, ex.Message); } }
public void DeleteApplicationPool(ApplicationPool applicationPool) { applicationPool.Delete(); _serverManager.CommitChanges(); }