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

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




Nov 16 '05 #1
0 1230

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

Similar topics

0
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
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
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
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
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
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
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
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
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....
7
rhitam30111985
by: rhitam30111985 | last post by:
Hi all i am trying to compile a set of source files located in location In the following code sample i am trying to compile a visual c++ 6.0 (dsp) project from a c# application ...
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
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
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...

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.