All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
WEB 2.0中AJAX应用的详细探讨_[AJAX教程]
ASP.NET中制作WEB统计图控件的捷径_[Asp.Net教程]
asp.net2.0中Crystal报表设计器的环境介绍
无论技术高低 利用HTML优化加快网页速度_[Html教程]
用php实现广告轮播_php资料_编程技术
PHP编程中break及continue两个流程控制指令_php资料_编程技术
Zope的优点和Apache+PHP+MySQL的比较_php资料_编程技术
asp.net跳转页面的三种方法比较_.net资料_编程技术
让你的ASP.NET虚拟主机也支持子网站_.net资料_编程技术
PHP.MVC的模板标签系统之标签行为调度_[PHP教程]
Reading number is top 10 pictures
The mother was a stay-at-home children too tired took three baby suicide
Azusa Yamamoto1
乳娘帕梅拉安德森2
Sora aoi possession of boudoir1
Seductive beauty of crime1
9.3阅兵全景图4-陸海空现代化兵种方阵梯队
移民小国也实惠2
Chinese paper-cut grilles art appreciation8
The money of more than 100 countries and regions3
The real super beauty8
Download software ranking
双旗镇刀客A
天龙八部最新服务端
Boxer Classic video2
Unix video tutorial3
网页特效实例大全
Sora aoi, the maid, students' uniforms
VC++6.0培训教程
豪门浪荡史
Tram sex maniac 2 (H) rar bag1
I'm come from Beijing2
delv published in(发表于) 2014/1/23 2:48:22 Edit(编辑)
.net获取w3wp进程对应的应用程序池_[Asp.Net教程]

.net获取w3wp进程对应的应用程序池_[Asp.Net教程]

.net获取w3wp进程对应的应用程序池_[Asp.Net教程]

C#.net


using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Diagnostics;
using System.Management;
using System.Windows.Forms;

namespace TextConvertor
{
/**////


/// W3wp 的摘要说明。
///

public class W3wp
{
private W3wp(){}
public static string GetAllW3wp(string input)
{
ObjectQuery oQuery = new ObjectQuery("select * from Win32_Process where Name='w3wp.exe'");
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oQuery);
ManagementObjectCollection oreturnCollection = oSearcher.Get();

string pid;
string cmdLine;
StringBuilder sb = new StringBuilder() ;
foreach(ManagementObject oreturn in oreturnCollection)
{
pid = oreturn.GetPropertyValue("ProcessId").ToString();
cmdLine = (string)oReturn.GetPropertyValue("CommandLine");

string pattern = "-ap \"(.*)\"" ;
Regex regex = new Regex(pattern, RegexOptions.IgnoreCase) ;
Match match = regex.Match(cmdLine) ;
string appPoolName = match.Groups[1].ToString() ;
sb.AppendFormat("W3WP.exe PID: {0} AppPoolId:{1}\r\n", pid, appPoolName );
}

return sb.ToString();
}
}
}







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.