Can not execute the "NextValue() of PerformanceCounter" RRS feed

  • Question

  • Dear all

    Many times I tried to execute the NextValue() in PerformanceCounter logic but it does not action anything for a long time.

    (I used asp.net with IIS and above code was in cs page)

    * reference code

       PerformanceCounter cpu = new PerformanceCounter();
                    cpu.CategoryName = "Processor";
                    cpu.CounterName = "% Processor Time";
                    cpu.InstanceName = "_Total";

    Finally the execution stop and there are no return value.

    (just expired execution)

    Please kindly let me know what I am wrong to make a code.

    Tuesday, April 17, 2018 2:17 AM

All replies

  • Any reply will be helpful to solve it.
    Tuesday, April 17, 2018 4:56 AM
  • Hi Gin Dev,

    Thank you for posting here.

    For your question is more related to ASP.NET, you could post a new thread in ASP.NET forum for suitable support.

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework, including Managed Extensibility Framework (MEF), Charting Controls, CardSpace, Windows Identity Foundation (WIF), Point of Sale (POS), Transactions.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Sunday, April 22, 2018 10:41 PM