Jump to Solution
Over the last few weeks I was troubleshooting Event ID 1022 – .NET Runtime Failed to CoCreate Profiler on my Server 2008/IIS 7.5 machine. After some research, I found that this error was due to the installation of the Windows Diagnostic Tool for profiling .NET applications. The proper fix for the .NET Runtime Failed to CoCreate Profiler is to uninstall or disable any profiling tools, however, the installation was corrupt and would not allow me to uninstall it.
After some more research (postback links below), I found that there is an environment variable called COR_ENABLE_PROFILING that was set to 7 and it needs to be set to 0 to fully disable profiling and get rid of the .NET Runtime Failed to CoCreate Profiler error in the event log. One article listed a few registry keys to modify, however, they were overwritten on a reboot. Another article explained to to fully remove/change system wide environment variables. Putting the two articles together, I found the solution
After a reboot, log into the system and run “set” from the command line. Find COR_ENABLE_PROFILING and ensure the value is 0. Next, verify that Event ID 1022 – .NET Runtime Failed to CoCreate Profiler is no longer showing up in your eventvwr