“Category does not exist.” Creating performance counter for MSMQ Queue
问题 I am attempting this: using System.Diagnostics; // ... var queueCounter = new PerformanceCounter( "MSMQ Queue", "Messages in Queue", @"machinename\private$\testqueue2"); Console.WriteLine( "Queue contains {0} messages", queueCounter.NextValue().ToString()); Which came from this post: Is there a way to check how many messages are in a MSMQ Queue? There is mention of this same error, but no resolution when using PerformanceCounter. I also found mention here: Performance Counter - System