C# 关闭、开始、回收应用程序进程池
来源:互联网 发布:php的缺点 编辑:程序博客网 时间:2024/06/05 15:42
在公司的某个项目中,因为用到C++开发的第三方dll,一旦更新的时候,需要手动去回收下进程池,感觉很麻烦,于是做了这个功能,通过web管理后台来回收:
启动/停止/回收指定应用程序池源码入下;
string AppPoolName="thylx"; //应用程序池命名,当找不到该应用程序池时,系统会报找不到指定路径
string method="Start"; //启动命令, 停止:“Stop” ; 回收:“Recycle”
try
{
DirectoryEntry appPool = new DirectoryEntry("IIS://localhost/W3SVC/AppPools");
DirectoryEntry findPool = appPool.Children.Find(AppPoolName,"IIsApplicationPool");
findPool.Invoke(method,null);
appPool.CommitChanges();
appPool.Close();
Response.Write("启动成功!");
}
catch(Exception ex)
{
Response.Write(string.format("发生异常:{0}",ex.ToString()));
}
0 0
- C# 关闭、开始、回收应用程序进程池
- IIS7关闭应用程序池自动回收
- IIS 7 应用程序池自动回收关闭的解决方案
- c# 关闭其它应用程序
- IIS6.0应用程序池回收和工作进程
- IIS6.0应用程序池回收和工作进程【转】
- IIS6.0应用程序池回收和工作进程
- IIS6.0应用程序池回收和工作进程
- IIS6.0应用程序池回收和工作进程
- IIS6.0应用程序池回收和工作进程
- IIS6.0应用程序池回收和工作进程
- IIS6.0应用程序池回收和工作进程
- IIS6.0应用程序池回收和工作进程
- C# 关闭某个进程
- c# 关闭进程
- c# 关闭指定进程
- C# 关闭进程
- C#关闭进程
- android为RadioButton动态添加style样式
- 使用DevExpress的WebChartControl控件绘制图表(柱状图、折线图、饼图)
- kksfbc child completion
- Session state has been disabled for ASP.NET.
- Nginx 利用Linux 的PAM 机制整合各种登录
- C# 关闭、开始、回收应用程序进程池
- 卡特兰数
- PL2303串口模块研究
- Yii CFileHelper常见的文件操作方法
- topcoder 刷题笔录 初级篇(一)
- GCD-queue介绍
- Android深入浅出之Audio 第一部分 AudioTrack分析
- Java自学--二叉树排序
- 【转自唐忍】Android中IntentService的原理及使用