473,406 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Category does not exist - Performance counter

LP
Hi,

I am trying to run my webservice which creates a performance counetr and
writes to it on Windows 2003, where the following error is returned. It runs
fine on Windows 2000.

Error:
[InvalidOperationException: Category does not exist.]
System.Diagnostics.PerformanceCounterLib.CounterEx ists(String machine,
String category, String counter) +283
System.Diagnostics.PerformanceCounter.Initialize() +235
System.Diagnostics.PerformanceCounter..ctor(String categoryName, String
counterName, String instanceName, Boolean readOnly) +127
System.Diagnostics.PerformanceCounter..ctor(String categoryName, String
counterName, Boolean readOnly) +21
System.Diagnostics.PerformanceCounter..ctor(String categoryName, String
counterName) +11
PCHistory.Global.SetupPerformanceCounters()
PCHistory.Global.Application_Start(Object sender, EventArgs e)

Pls help.
Nov 21 '05 #1
1 9058
Hi LP,

I suppose that your category is not created in the performance counters at all. You should install the performance counter first by setting up installer project and use PerformanceCounterInstaller class. You should not have to leave the creation of the counter by your web service since, which is your case, it may not have sufficient rights. It did have though on Windows 2000, but due to increased security in Windows 2003 it fails.

Best,
Martin

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Hi5 | last post by:
Hi, I am designing a database for a client in which It has a client table including the followings: 1-Table Client 2-Table lookupcategory 3-Table Ctegory
0
by: Sean | last post by:
Can someone please post some sample code that shows how to add another performance counter to an already existing category? thanks, Sean
0
by: Christopher Attard | last post by:
Hi, I want to make use of the Performance Counter "Connections active" which falls under the "TCP" Performance object. I'm using the following code (in C#) to get the performance counter: ...
7
by: sammy | last post by:
ok... so i restarted my server and i get a "Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh"...
17
by: 57R4N63R | last post by:
I'm currently building a website for one of the client. There has been few errors here and there, but just recently the problem is getting worse. Basically the symptoms is that when the user try...
4
by: yxq | last post by:
System.InvalidOperationException: Category does not exist. at System.Diagnostics.PerformanceCounterLib.CounterExists(String machine, String category, String counter) at...
1
by: Andreas | last post by:
Hi, I just created a new .net windows service that makes use of some performance counters in its own category. Unfortunately, when I run installutil.exe on the service binary to install, the...
1
by: jvn | last post by:
I am experiencing a particular problem with performance counters. I have created a set of classes, that uses System.Diagnostics.PerformanceCounter to increment custom performance counters (using...
24
by: Phil Latio | last post by:
Let's say I have a simple web application running with just two MySQL tables. The tables structure is as follows: Table: category category_id (PK) category_name parent_category (FK)...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.