title: Failure in delete performance counter category
body: <p>I have this simple code:</p>
  
  <pre><code>public void CreateCounters() {
      if (PerformanceCounterCategory.Exists(_categoryName)) {
          PerformanceCounterCategory.Delete(_categoryName);
      }
  
      // create logic…
  }
  </code></pre>
  
  <p>works on my machine.
  I run it on my server, get the following stack trace:</p>
  
  <pre><code>System has detected a fatal error. EXITING... 
  NativeErrorCode: 1010 
  ErrorCode: -2147467259 
  Message: The configuration registry key is invalid 
  TargetSite: Void RegisterFiles(System.String, Boolean) 
  HelpLink:  
  Source: System 
  Stack Trace: 
   at System.Diagnostics.PerformanceCounterLib.RegisterFiles(String arg0, Boolean unregister) 
   at System.Diagnostics.PerformanceCounterCategory.Delete(String categoryName) 
   at myApp.Common.Utils.PerformanceCounters.PerformanceCounters.CreateCounters() 
   at myApp.Common.Utils.PerformanceCounters.myAppPerformanceCounterReporter.Init() 
   at myApp.Common.Utils.PerformanceCounters.myAppPerformanceCounterReporter.get_Instance() 
   at myApp.Program.Main(String[] args) 
  </code></pre>
  
  <p>The category exists on the server, I can see it in <code>perfmon</code> GUI.</p>