I'm trying to get the process id of some application and I get an error for this line:
Process [] myApplications= Process.GetProc essesByName("My Application");
The error says:
System.InvalidO perationExcepti on: Process performance counter is disabled, so the requested operation cannot be performed.
at System.Diagnost ics.NtProcessMa nager.GetProces sInfos(Performa nceCounterLib library)
at System.Diagnost ics.NtProcessMa nager.GetProces sInfos(String machineName, Boolean isRemoteMachine )
at System.Diagnost ics.ProcessMana ger.GetProcessI nfos(String machineName)
at System.Diagnost ics.Process.Get ProcessesByName (String processName, String machineName)
at System.Diagnost ics.Process.Get ProcessesByName (String processName)
How can I enable the performance counters? Is this required on all computers on which my application will run?
Cheers,
Max 1 8486
check oput the following link, we had a similar problem and the link at
bottom helped: http://weblogs.asp.net/nunitaddin/ar...21/267559.aspx http://msdn.microsoft.com/netframewo...aspx#Question7
HTH
Ollie Riches
"Max" <ma******@yahoo .com> wrote in message
news:OV******** *****@TK2MSFTNG P15.phx.gbl... I'm trying to get the process id of some application and I get an error for this line:
Process [] myApplications= Process.GetProc essesByName("My Application");
The error says:
System.InvalidO perationExcepti on: Process performance counter is disabled, so the requested operation cannot be performed. at System.Diagnost ics.NtProcessMa nager.GetProces sInfos(Performa nceCounterLib library) at System.Diagnost ics.NtProcessMa nager.GetProces sInfos(String machineName, Boolean isRemoteMachine ) at System.Diagnost ics.ProcessMana ger.GetProcessI nfos(String machineName) at System.Diagnost ics.Process.Get ProcessesByName (String processName, String machineName) at System.Diagnost ics.Process.Get ProcessesByName (String processName)
How can I enable the performance counters? Is this required on all computers on which my application will run?
Cheers, Max This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
'System.InvalidOperationException' occurred in system.dll. Additional
information: Process performance counter is disabled, so the requested
operation cannot be performed."
My application works fine in my development machine as well as another...
|
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 performance
counter is disabled, so the requested operation
cannot be performed."
(System.Diagnostics.Process.GetProcessesByName() seems to be the function it
|
by: Charles Law |
last post by:
Hi guys
I have a time critical process, running on a worker thread. By "time
critical", I mean that certain parts of the process must be completed in a
specific time frame. The time when the process starts is not especially
important, but it must be complete within a small number of seconds.
The operations I am performing do not take a long time (hundreds of
milliseconds), but as each part of the process is complete, my worker thread...
|
by: Lukas Egger |
last post by:
Hi guys
I work with Threads. Unfortunately I have generated too many threads and the
program crushed.
Now when I work with Process (Process.GetProcessesByName() or other Process
functions) I get the following error message: "The request can't be
exexuted, because the Process Performance Indicator is deactivated".
(German: "Die Anforderung kann nicht ausgeführt werden, da der
Prozessleistungsindikator deaktiviert ist.")
A Windows reboot...
|
by: Gaby |
last post by:
Hi all,
I’ve made a procedure to find a specific process. This works fine under XP
or 2000 but not work under xp embedded.
Any idea why?
See procedure:
static public bool IsRunning(string processname)
{
processname = processname.ToLower();
| |
by: Rob R. Ainscough |
last post by:
I'm using the Diagnostics.Process approach to shelling out run the
following:
C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q
..FileName = "C:\Windows\System32\MSIEXEC.EXE"
..Arguments = "/x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q"
..Start()
I do a WaitForExit and get an error code back from MSIEXEC of 1605 -- this
|
by: 5000wpm |
last post by:
"couldn't get process information from remote machine" - Access denied
Using VS2003 VB.NET 1.1 under Windows XP Pro x64.
Hi,
Having recently upgraded to Windows XP Pro x64 a problem has developed
in my code.
I have boiled this problem down into smaller and smaller apps until I
am at this point:
|
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 be performed.
Stack Trace:
at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library)
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |