473,513 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Diagnostics.Process.GetProcessesByName() - Exception

Hi,

One of our customers seem to be having an issue with our software getting
the following exception on running the app.

'System.InvalidOperationException', with the message "Process performance
counter is disabled, so the requested operation
cannot be performed."

(System.Diagnostics.Process.GetProcessesByName() seems to be the function it
excepts on)

I've done a look on google and found the following message from MS support

"It is because one performance counter used to retrieve processes are
disabled. To fix it, you try removing the "Disable Performance Counters"
entry from the following registry entry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\PerfProc\Performance

You may refer to the following two Knowledge Base articles to get more
information about enabling and disabling performance monitors:

PRB: Performance Object Is Not Displayed in Performance Monitor
http://support.microsoft.com/default...;EN-US;q249138

INFO: Controlling the Disabling of Performance Monitor Extensions
http://support.microsoft.com/default...;en-us;Q248993

I hope this helps you.

Best regards,

Lion Shi [MSFT]
MCSE, MCSD
Microsoft Support Engineer"

We've managed to repeat the problem here with disabling the Performance
counters.

The customer has checked and the Performance counters are not disabled.
The customer has also explicitly changed the registry to enable performance
counters.

So after more searching on google...

I've asked the customer to (given the time difference, this may take a
while)

1) Check whether the pagefiel has been disabled or not, since this can turn
off the performance counters. Need to ensure it is enabled.
Control Panel -> System -> Advanced -> Performance Settings -> Advanced ->
Change

2) Check or send me the event logs for the PC.
When a perfmon crashes or doesn't report data for a while Windows disables
it and leaves it disabled.

3) Check the status of PerfMon and enable/disable them using the
exctrlst.exe tool from MS, its part of Windows 2000 resource kit.

The customer is running XP Home edition on the offending machine. The
software works fine on other machines (so far).

Has anybody got any other ideas on what I should be looking into to solve
this problem?

Rollasoc




Jul 21 '05 #1
0 3524

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

Similar topics

0
2144
by: jonathan.zimmerman | last post by:
I cannot allow two instances of my app to run, so I try running the following code: #using <mscorlib.dll> #include "mainForm.h" using namespace System::Diagnostics; int __stdcall WinMain()...
0
1233
by: rollasoc | last post by:
Hi, One of our customers seem to be having an issue with our software getting the following exception on running the app. 'System.InvalidOperationException', with the message "Process...
5
1109
by: Jarod_24 | last post by:
How do i prevent getting a System.Security.SecurityException when running my app from a Network Drive? My app stopped when checking for a previous instance of itself using the code: Private...
8
2382
by: trialproduct2004 | last post by:
Hi all. I am having application in vb.net. I am having module and one form. From module i am opening form. On main itself i am checking whether another instance of application is running or...
2
298
by: shivaranjani.s.adimulam | last post by:
Hi, I have a .NET application where I want to restore the previos application if it is already running and in minimized state. The code I added is working fine in the case if the previous...
2
2627
by: Robert S. Liles | last post by:
Following the advice of several members, especially Dragon, I have gotten this routine to work. If you double click on your program's icon to load it, and it is already running minimized into the...
5
4162
by: folke | last post by:
I'm using the Process class in my app to start another app, appXXX, I wrote. Appxxx is located at c:\folke\appxxx.exe This is wroking fine from a Windows Application, but NOT from an ASP.NET...
11
3714
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very...
0
1773
by: Daniel | last post by:
System.Diagnostics.Process.Start fails on windows server 2003 the process returns process.ExitCode == 0 but executing any process with System.Diagnostics.Process.Start on windows xp works fine....
0
7171
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
7388
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
7545
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7539
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
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.