473,382 Members | 1,386 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,382 software developers and data experts.

Performance Counter is Disabled so the requested operation cannot be performed

17
Hello,

The application I am using works on most machines except one where in it throws the following exception...

Error:
Process Performance Counter is Disabled, so requested operation cannot be performed.

Stack Trace:

at System.Diagnostics.NtProcessManager.GetProcessInfo s(PerformanceCounterLib library)
at System.Diagnostics.NtProcessManager.GetProcessInfo s(String machineName, Boolean isRemoteMachine)
at System.Diagnostics.ProcessManager.GetProcessInfos( String machineName)
at System.Diagnostics.Process.GetProcessesByName(Stri ng processName, String machineName)
at System.Diagnostics.Process.GetProcessesByName(Stri ng processName)



After some research on this...

People have put forth two solutions..

1) Set entires in registry:

Link: http://www.dotnet247.com/247reference/msgs/51/255103.aspx

As per the above link i tried doing wht they have suggested but I cannot find "Disable Performance Counters"..



2) Add the user as an admin

Link: http://www.ureader.com/message/303147.aspx

In the above link the person said:
On W2K3, you will get - System.InvalidOperationException: Process
performance counter is disabled, so the requested operation cannot be
performed - if you try to get process performance information using the
Process class under a non-admin account.
As a workarround you could add the non-admin accounts to the "Performance
Counter Users" Group on W2K3.

I dont see any performnace counter user group? how do i create this group?


Could some one please help me with wht is to be done?

Appreciate it..
Thanks,
JSha
Aug 23 '07 #1
0 1614

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Raj | last post by:
Hi! Every time my applicaiton call "System.Diagnosis.Process.GetProcesses() and some other related APIs in dotnet framework, it throws the following exception: "An unhandled exception of type...
6
by: Scott CM | last post by:
I have a multi-part question regarding trigger performance. First of all, is there performance gain from issuing the following within a trigger: SELECT PrimaryKeyColumn FROM INSERTED opposed...
16
by: Tamir Khason | last post by:
Follow the code I have to check the performance double a = r.Next(9)*1e307; DateTime d = DateTime.Now; double b = Math.Pow(a,1/(double)100); TimeSpan tm = DateTime.Now - d;
1
by: Max | last post by:
I'm trying to get the process id of some application and I get an error for this line: Process myApplications= Process.GetProcessesByName("MyApplication"); The error says: ...
0
by: J Gao | last post by:
Hi, All, I got this error when trying to compile a web project. The file 'bin\Kennel.dll' cannot be copied to the run directory. The requested operation cannot be performed on a file with a...
2
by: Jonesgj | last post by:
Hi, I have a test box which I would like to monitor CPU usage and run queue during the day. I don't want to buy any 3rd party tool, if I can do it easily, as I only need to monitor the box's...
7
by: Peter Ritchie | last post by:
I'm writing a Web Service and I would like to add performance counter data for monitoring performance of the Web Service's operations over time and load. The problem is, I get the "Requested...
1
by: JSha | last post by:
Hello, The application I am using works on most machines except one where in it throws the following exception... Error: Process Performance Counter is Disabled, so requested operation cannot...
30
by: galiorenye | last post by:
Hi, Given this code: A** ppA = new A*; A *pA = NULL; for(int i = 0; i < 10; ++i) { pA = ppA; //do something with pA
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.