PerformanceCounterCategory.GetCategories() throws exception ArgumentException - Invalid value '' for parameter 'categoryName'

大憨熊 提交于 2019-12-08 15:59:16

问题


When I try to run this code:

var categories = System.Diagnostics.PerformanceCounterCategory.GetCategories();

I get an ArgumentException exception.

I already tried the following with no luck:

  • How to manually rebuild Performance Counter Library http://support.microsoft.com/kb/300956
  • lodctr /R
  • Logged in as a local administrator.
  • Disabled User Access Control (UAC)
  • Made my user member of the Performance Monitor Users group.

I get the same result whether I run Visual Studio 2008, 2010 or 2012, on a Windows 7 Enterprise SP1 64-bit computer.

I will appreciate any help.

Thank you.


回答1:


Had the same problem.

This was on a machine that had an NVidia Quadro 2000 card.

Uninstalling the "NVidia WMI" product solved the issue... :)



来源:https://stackoverflow.com/questions/18751789/performancecountercategory-getcategories-throws-exception-argumentexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!