Article ID: 971601 - Last Review: August 19, 2009 - Revision: 1.0

FIX: The performance counters that monitor an application stop responding when the application exits and restarts and you receive the System.InvalidOperationException exception on a computer that is running .NET Framework 2.0

Expand all | Collapse all

SYMPTOMS

You add performance counters to monitor an application on a computer that is running the Microsoft .NET Framework 2.0. The application exits and then restarts. However, the values in the performance counters do not change and you receive a System.InvalidOperationException exception together with the following exception error message:
Instance '< Instance name of the performance counter>' already exists with a lifetime of Process. It cannot be recreated or reused until it has been removed or until the process using it has exited.

CAUSE

This problem occurs because the handles are not cleaned up after the process that owns the performance counters exits. Then, the Common Language Runtime (CLR) throws the exception described in the symptoms section.

RESOLUTION

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To download this hotfix from the MSDN Code Gallery, visit the following Microsoft Web site:
http://code.msdn.microsoft.com/KB971601 (http://code.msdn.microsoft.com/KB971601)

Note The MSDN Code Gallery displays the languages for which the hotfix is available. If you do not see your language listed, it is because the Code Gallery resource page is not available for that language.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
Note You can also download this hotfix from the following Microsoft Web site:
https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=20551 (https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=20551)

Prerequisites

You must have .NET Framework 2.0 Service Pack 2 (SP2) installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
x86 version for Windows Server 2000, Windows Server 2003 and Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.dll2.0.507 27.40423,149,82429-May-200904:30x86
x64 version for Windows Server 2000, Windows Server 2003 and Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.dll2.0.507 27.40423,149,82429-May- 200904:04x64
System.dll2.0.50727.40423 ,149,82429-May-200904:30x86
Itanium-based version for Windows Server 2000, Windows Server 2003 and Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.dll2.0.507 27.40423,149,82429-May-200904:04IA-64
System.dll2.0.50727.40423,149,82429-May- 200904:30x86

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

APPLIES TO
  • Microsoft .NET Framework 2.0 Service Pack 2
Keywords: 
kbhotfixserver kbexpertiseadvanced kbqfe kbsurveynew KB971601
 

Article Translations