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)
at RSEDM.Presentation.DoPageInit()
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