Project Description
.net Interface for IIS

Properties are readonly at the moment expect a new non read only version soon...

Find Site By Name or ID

IISAdmin.ServerManager siteMgr = new IISAdmin.ServerManager();
IISAdmin.Site site = siteMgr.Sites["Default Web Site"];

Create New Web Site

IISAdmin.ServerManager siteMgr = new IISAdmin.ServerManager();
IISAdmin.Site site = siteMgr.Sites.Add("NewWebSite", ":80:", "C:\\iissite");

Delete Web Site

IISAdmin.ServerManager siteMgr = new IISAdmin.ServerManager();
siteMgr.Sites.Remove("12345678");  // Site ID

Linq aware

IISAdmin.ServerManager siteMgr = new IISAdmin.ServerManager();
var sites = siteMgr.Sites.Where(s => s.AppPoolId == "DefaultAppPool");

Last edited Oct 8, 2008 at 4:08 PM by thomaspleasance, version 14