PerformanceCounterCategory.GetCategories() returning fewer categor

U

using.net

On Windows 2008 Server with IIS7, PerformanceCounterCategory.GetCategories()
is not returning some performance counter categories, including the new ones
such as W3SVC_W3WP and WAS_W3WP from w3ctrs.dll. Try

PerformanceCounter perfcounter =
new PerformanceCounter("W3SVC_W3WP", "Total HTTP Requests Served");

and it would cause the following error:

Error: System.InvalidOperationException -> Category does not exist.

We can see those categories in perfmon locally and they are enabled. Both
64-bit and 32-bit Windows 2008 Server have the same issue. We have searched
online for solution, but haven't found any applicable one yet. Any
suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top