Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PerformanceCounterCategory.GetCategories not returning all categor

27 views
Skip to first unread message

using.net

unread,
Oct 8, 2009, 8:52:01 PM10/8/09
to
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?

0 new messages