Process Performance Counters Disabled workaround

Source: Internet
Author: User

Unhandled Exception: Process performance counters are disabled

Debug Error:

Unhandled exception: System.InvalidOperationException: The process performance counter is disabled, so the requested operation cannot be performed

Problem solving:

Method One:

Just fix the Windows performance counters.

Specific method: In the Run input: lodctr/r then enter, after running, restart the computer.

Method Two:

Modify registry information

Hkey_local_machine/system/currentcontrolset/services/perfproc/performance the following key value disable performance Counters set to 0. Reboot again!

Using C # Programming to implement the "Set Disable performance counters key value is 0"

Using Microsoft.Win32;

private void Button7_click (object sender, System.EventArgs e)

{

RegistryKey HKLM = Registry.localmachine;

RegistryKey software = HKLM. OpenSubKey ("System//currentcontrolset//services//perfproc", true);

RegistryKey mykey= software. OpenSubKey ("Performance", true);

Mykey.setvalue ("Disable performance Counters", 0);

}

Requires the current user to be an administrator on this computer, otherwise there is no permission to modify the registry

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.