在Window2003上执行System.Diagnostics.Process.GetProcessesByName等方法失败的原因
2005-01-20 15:28
507 查看
在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
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
相关文章推荐
- 在Window2003上执行System.Diagnostics.Process.GetProcessesByName等方法失败的原因
- Process.GetProcessesByName ,返回一个Process[],这句话是判断当前程序启动了几个
- Python执行cmd的各种实现方法及优劣(subprocess.Popen, os.system和commands.getstatusoutput)
- Dom4j递归解析XML实现JS的getElementsByName类似方法
- 获取表单对象,得三种方法getElementById(), getElementsByName(), and getElementsByTagName() 和用法
- 解决oracle12c安装报“[INS-30131]执行安装程序验证所需的初始设置失败(原因:无法访问临时位置)”方法
- linux下vi或vim操作Found a swap file by the name的原因及解决方法
- System.Diagnostics.Process 执行.EXE
- 没有document.getElementByName方法
- 获取HTML元素3个方法:document.getElementsByName()、document.getElementById()、document.getElementsByTagName()
- DOM方法 getElementsByName()方法
- HTML5实战与剖析之CSS选择器getElementsByClassName()方法
- JavaMail使用getMessageByUID方法获取腾讯邮箱失败的解决方法
- 解决 IE 不支持 document.getElementsByClassName() 的方法
- 解决C、C++程序执行结果一闪而过的方法---system("pause")、getchar()、cin.get()
- 兼容浏览器的getElementsByClassName方法
- 推荐一个封装好的getElementsByClassName方法
- IE浏览器不支持getElementsByClassName的解决方法
- js 获取位置信息方法 navigator.geolocation.getCurrentPosition 失败原因分析
- js 如何获取class的元素 以及创建方法getElementsByClassName