10 August, 2010
0 Comments
1 category
If you want to determine if an ApplicationPool exists in IIS7 you can use the following code:
public bool Exists(string name) { bool result = false; using (ServerManager manager = new ServerManager()) { result = manager.ApplicationPools.Any(t => t.Name == name); } return result; }
You can find the Microsoft.Web.Administration.dll in "%windir%\System32\inetsrv".
Category: Uncategorized