Help to resolve <<Process performance counter is disabled, so the requested operation cannot be performed.>> Error



dreamamit2001@yahoo.com
07-09-2005, 09:25 PM
Hi,

I have a query on Process Performance Counter in
System.Diagnostics.Process

We have developed VB.NET Application named office solutions, which
gives the following Error on

Win XP Pro, 5.1.2600 sp1 configuration

System.InvalidOperationException: Process performance counter is
disabled, so the requested operation cannot be performed.


> at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library)

> at System.Diagnostics.NtProcessManager.GetProcessInfos(String machineName, Boolean isRemoteMachine)

> at System.Diagnostics.ProcessManager.GetProcessInfos(String machineName)

> at System.Diagnostics.Process.GetProcessesByName(String processName, String machineName)

> at System.Diagnostics.Process.GetProcessesByName(String processName)

> at OfficeSolutions.Results.Results_Load(Object sender, EventArgs e)

> at System.Windows.Forms.Form.OnLoad(EventArgs e)

> at System.Windows.Forms.Form.OnCreateControl()

> at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

> at System.Windows.Forms.Control.CreateControl()

> at System.Windows.Forms.Control.WmShowWindow(Message& m)

> at System.Windows.Forms.Control.WndProc(Message& m)

> at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

> at System.Windows.Forms.ContainerControl.WndProc(Message& m)

> at System.Windows.Forms.Form.WmShowWindow(Message& m)

> at System.Windows.Forms.Form.WndProc(Message& m)

> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)

> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)

> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32

> msg, IntPtr wparam, IntPtr lparam)



Should this error be resolved on this configuration?

Please help us how we can resolve above Error? How we can Enable the
Process performance counter?

KM
07-09-2005, 09:25 PM
You will need at least "Base Performance Counters" and "Performance Counter
Configuration" components in your XPe Config.
Also, you will need to enable pagefile support in the image.

KM

> Hi,
>
> I have a query on Process Performance Counter in
> System.Diagnostics.Process
>
> We have developed VB.NET Application named office solutions, which
> gives the following Error on
>
> Win XP Pro, 5.1.2600 sp1 configuration
>
> System.InvalidOperationException: Process performance counter is
> disabled, so the requested operation cannot be performed.
>
>
>> at
>> System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib
>> library)
>
>> at System.Diagnostics.NtProcessManager.GetProcessInfos(String
>> machineName, Boolean isRemoteMachine)
>
>> at System.Diagnostics.ProcessManager.GetProcessInfos(String
>> machineName)
>
>> at System.Diagnostics.Process.GetProcessesByName(String processName,
>> String machineName)
>
>> at System.Diagnostics.Process.GetProcessesByName(String processName)
>
>> at OfficeSolutions.Results.Results_Load(Object sender, EventArgs e)
>
>> at System.Windows.Forms.Form.OnLoad(EventArgs e)
>
>> at System.Windows.Forms.Form.OnCreateControl()
>
>> at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
>
>> at System.Windows.Forms.Control.CreateControl()
>
>> at System.Windows.Forms.Control.WmShowWindow(Message& m)
>
>> at System.Windows.Forms.Control.WndProc(Message& m)
>
>> at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
>
>> at System.Windows.Forms.ContainerControl.WndProc(Message& m)
>
>> at System.Windows.Forms.Form.WmShowWindow(Message& m)
>
>> at System.Windows.Forms.Form.WndProc(Message& m)
>
>> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
>
>> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
>
>> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
>
>> msg, IntPtr wparam, IntPtr lparam)
>
>
>
> Should this error be resolved on this configuration?
>
> Please help us how we can resolve above Error? How we can Enable the
> Process performance counter?
>


Help to resolve <<Process performance counter is disabled, so the requested operation cannot be performed.>> Error