在Window2003上执行System.Diagnostics.Process.GetProcessesByName等方法失败的原因

2016-01-29 13:00 52 1 收藏

在Window2003上执行System.Diagnostics.Process.GetProcessesByName等方法失败的原因,在Window2003上执行System.Diagnostics.Process.GetProcessesByName等方法失败的原因

【 tulaoshi.com - ASP.NET 】

在Windows2003上执行 System.Diagnostics.Process.GetProcessesByName等方法会报出Exception:
Couldn't get process information from remote machine.

这个错误的原因是: 获取Process与Performance Counter相关, 当前的执行用户不是Administrator 组成员
MSDN的解释:1.Performance information is not available to a non-admin account, which is not in the Performance Counter Users Group on Windows Server 2003. So the Process class could not get process performance information in this case.

2.Getting performance data from all the processes on the machine is pretty expensive. The operating system (OS) might load lots of DLLs and it might take seconds to complete. The floppy drive light will be on when the OS tries to find the index for some performance counter.
3.f the performance counter data was corrupted for any reason, the Process class could throw an exception while trying to convert some raw performance information into DateTime.

4.The Process class could not be used to get process information on machines without the process performance counter. Performance counters can be disabled in Windows. See the following link for details: http://www.microsoft.com/windows2000/techinfo/reskit/en-us/default.asp?url=/windows2000/techinfo/ reskit/en-us/regentry/94214.asp

The good news is that we have changed the implementation of the Process class in Visual Studio 2005 (our next release, code-named Whidbey). The Process class doesn't have a dependency on performance counter information any more (this is only true for local processes).

相关链接:
http://msdn.microsoft.com/netframework/programming/bcl/faq/SystemDiagnosticsProcessFAQ.aspx

来源:https://www.tulaoshi.com/n/20160129/1488492.html

延伸阅读
标签: Web开发
// written by Dean Edwards, 2005 // with input from Tino Zijdel, Matthias Miller, Diego Perini // http://dean.edwards.name/weblog/2005/10/add-event/ function addEvent(element, type, handler) {   if (eleme...
标签: 电脑入门
LibreOffice在Ubuntu系统中本身就存在的,可是有些人喜欢使用LibreOffice官方标准版,这就需要手动安装LibreOffice了,且需要将原本的LibreOffice卸载,下面图老师小编就教你如何安装LibreOffice。 这个版本是 Ubuntu 的定制版本,能够在 Ubuntu 中更好的工作。它也集成了 Ubuntu 的应用菜单和其它设置。 下载页面中的 LibreOffice 官方版本...
标签: 丰胸
案例分析 图钉提问: 我想去隆胸,每天报道上手术失败什么的,我想问一下,如果去正规的医院,失败的比重有多少?百分之一,或是千分之一? 图老师解答: 你好,如果你想做,一定要选正规的三甲医院做. 隆胸失败的原因 丰胸介绍 对于女性朋友来说,隆胸手...
标签: 电脑入门
在用MODEM上网时,我们很可能会碰到MODEM不执行拨号操作的麻烦。在正确连接微机、MODEM和电话线后,进行拨号上网操作时,如果MODEM没有拨号音,始终没连接上或指示灯没闪烁,表明MODEM没有执行拨号操作,造成该种故障的原因很多,现分析如下: 1.上一次使用时能否正确执行拨号操作,若上次使用时能拨号而现在不能拨号,请参见第2步,否则转到...
wps在文字上加拼音的方法   在文字上加拼音,相信很多人听都没听过,更别说知道这是什么效果了,今天图老师小编就给大家开开眼界。汉语拼音是我们从小时候开始就学的东西,也许现在我们认得很多的字。但是你家的小宝宝就不一定了,在wps中是可以给文字加拼音的。下面图老师小编就为大家分享一下wps怎么在文字上加拼音。 1、首先...

经验教程

203

收藏

85
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部