本篇文章主要介绍了" net重启iis线程池和iis站点程序代码分享",主要涉及到方面的内容,对于.NETjrs看球网直播吧_低调看直播体育app软件下载_低调看体育直播感兴趣的同学可以参考一下:
重启站点:复制代码 代码如下: /// /// 根据名字重启站点.(没重启线程池) /// <...
p.WaitForExit();
p.Close();
return strRst;
}
///
/// 关闭进程
///
/// 进程名称
///
public static bool CloseProcess(string ProcName)
{
bool result = false;
var procList = new ArrayList();
foreach (Process thisProc in Process.GetProcesses())
{
var tempName = thisProc.ToString();
int begpos = tempName.IndexOf("(") + 1;
int endpos = tempName.IndexOf(")");
tempName = tempName.Substring(begpos, endpos - begpos);
procList.Add(tempName);
if (tempName == ProcName)
{
if (!thisProc.CloseMainWindow())
thisProc.Kill(); // 当发送关闭窗口命令无效时强行结束进程
result = true;
}
}
return result;
}
以上就介绍了 net重启iis线程池和iis站点程序代码分享,包括了方面的内容,希望对.NETjrs看球网直播吧_低调看直播体育app软件下载_低调看体育直播有兴趣的朋友有所帮助。
本文网址链接:http://www.codes51.com/article/detail_1719784_4.html