![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
Code
//停止
System.ServiceProcess.ServiceController sc = new System.ServiceProcess.ServiceController("iisadmin");
if (sc.Status = System.ServiceProcess.ServiceControllerStatus.Running)
sc.Stop();
// 启动
System.ServiceProcess.ServiceController sc = new System.ServiceProcess.ServiceController("iisadmin");
sc.Start();
//重启
System.Diagnostics.Process.Start("iisreset");
posted @
2009-08-28 13:16
TSPWATER'S HOME
阅读(
261)
评论()
编辑
收藏
举报