标签:
停止IIS服务
ServiceController sc = new ServiceController("iisadmin");
if(sc.Status==ServiceControllerStatus.Running)
{
sc.Stop();
}
重启IIS服务
ServiceController sc = new ServiceController("iisadmin");
sc.Start();
重启进程
using System.Diagnostics;
Process.Start("iisreset");
转自:http://blog.csdn.net/educast/article/details/6227541
ASP.NET C# 如何在程序中控制IIS服务或应用程序池重启?
标签:
原文地址:http://www.cnblogs.com/sandunban/p/5180561.html