停止
ServiceController sc = new ServiceController("iisadmin");
if(sc.Status=ServiceControllerStatus.Running)
sc.Stop();www.goodsgy.com
啟動IIS服務
ServiceController sc = new ServiceController("iisadmin");
sc.Start();www.goodsgy.com
重啟
using System.Diagnostics;
Process.Start("iisreset");
www.goodsgy.com