Performance counters for ASP.NET 4 (or newer versions) may stop working. As a result, when you use certain ASP.NET 4 performance counters, errors such as the following may appear in the application event log:
"Unable to locate the open procedure "%pef_counter_name%" in DLL "%WINDOWS%\Microsoft.NET\Framework\v4.0.30319\aspnet_perf.dll" for the "ASP.NET" service."
"Performance counter data collection from the "ASP.NET" service has been disabled due to one or more errors generated by the performance counter library for that service."
Unregistering ASP.NET 2.0 on any operating system version where ASP.NET 4 is already registered corrupts some performance counter registrations for ASP.NET 4. This occurs because the ASP.NET 2.0 unregistration process cannot detect that a later version of ASP.NET is installed on the computer.
Re-run aspnet_regis.exe -iru from the 4.0 directory. Please note that on 64-bit machines aspnet_regiis –iru should be run from the 64-bit Framework installation directory (%windir%\Microsoft.net\Framework64\v4.0.30319).
ASP.NET Performance counters have generic counters (e.g. ASP.NET and ASP.NET Applications) and versioned counters (e.g. ASP.NET v2.50727 and ASP.NET Apps v2.50727). This allows side-by-side .NET Framework versions with different performance counter implementations. The higher version of the .NET Framework registered on the machine “owns” the generic objects, while all .NET Framework versions “own” their respective versioned counters. When ASP.NET 2.0 is un-registered it tries to “fix” the generic performance counters, ignoring that there is a higher version of ASP.NET registered. This is a known bug in ASP.NET 2.0.