WEB程序控制服务器
System.ServiceProcess.ServiceController sc=new System.ServiceProcess.ServiceController("IIS Admin");
if(sc.Status==System.ServiceProcess.ServiceControllerStatus.Running&&sc.CanStop==true)
{
try
{
sc.Stop();
}
catch(System.Exception ex)
{
Response.Write(ex.Message.ToString());
}
}
关了之后怎么打开呢?
if(sc.Status==System.ServiceProcess.ServiceControllerStatus.Running&&sc.CanStop==true)
{
try
{
sc.Stop();
}
catch(System.Exception ex)
{
Response.Write(ex.Message.ToString());
}
}
关了之后怎么打开呢?