none
Performance counter usage RRS feed

  • Question

  • Want to have something to record the number of failures of a program. (# plus 1 each time we got an exception which terminates the application)

    Considering to use perf counter, but find out performance counter instance does only record with the lifetime of the one execution of the application, is there any way to work around this or is there any way to count this?

    Thursday, June 26, 2014 7:15 PM

Answers

  • Hello,

    From your description, it seems that you are trying to log the exception during the application running.

    Then my suggestion is to use the try catch block and export exceptions to text file, for details, here is an example:

    http://www.codeproject.com/Articles/2344/Create-Simple-Error-Log-Files-using-ASP-NET-and-C

    If I misunderstand, please let me know.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, June 27, 2014 10:23 AM
    Moderator