操作iis
以后研究
try { string method = "Recycle"; string AppPoolName = "z.chinabett.com"; DirectoryEntry appPool = new DirectoryEntry("IIS://localhost/W3SVC/AppPools"); DirectoryEntry findPool = appPool.Children.Find(AppPoolName, "IIsApplicationPool"); findPool.Invoke(method, null); appPool.CommitChanges(); appPool.Close(); string a = string.Format("回收应用程序池{0}成功", AppPoolName, method); } catch (Exception ex) { throw ex; }