Resolve .NET and SCOM conflicts

Problem

New Relic's .NET agent reports successfully, then stops after a short period of time or a maintenance event such as an IIS reset or system reboot. If these symptoms occur and you are using Microsoft's System Center Operations Manager (SCOM), you are experiencing a SCOM profiler conflict.

Solution

Do not keep the Application Performance Monitoring (APM) portion of SCOM installed but disabled. This is not enough to prevent interference. You must flag it to not be installed.

To resolve SCOM profiler conflicts:

  1. Remove the SCOM profiler: Uninstall SCOM, or re-install SCOM and disable the APM portion in the install wizard.
  2. To resolve the SCOM conflict, restore the registry settings using PowerShell:

    $HKLM = 2147483650 #HKEY_LOCAL_MACHINE
    $reg = [wmiclass]"\\.\root\default:StdRegprov"
    $key = "SYSTEM\CurrentControlSet\Services\W3SVC"
    $name = "Environment"
    $value = "COR_ENABLE_PROFILING=1","COR_PROFILER={71DA0A04-7777-4EC6-9643-7D28B46A8A41}","NEWRELIC_INSTALL_PATH=C:\Program Files\New Relic\.NET Agent\"
    $reg.SetMultiStringValue($HKLM, $key, $name, $value)
    $key = "SYSTEM\CurrentControlSet\Services\WAS"
    $name = "Environment"
    $value = "COR_ENABLE_PROFILING=1","COR_PROFILER={71DA0A04-7777-4EC6-9643-7D28B46A8A41}","NEWRELIC_INSTALL_PATH=C:\Program Files\New Relic\.NET Agent\"
    $reg.SetMultiStringValue($HKLM, $key, $name, $value)
    iisreset
  3. Run these commands each time you restart your server, or create a startup script to restore these settings.
  4. Recycle your app pool, or from a command prompt, run IISRESET.

You must repair your installation each time you restart your server.

Cause

Microsoft's System Center Operations Manager (SCOM) includes an Application Performance Monitoring (APM) feature which conflicts with New Relic's .NET agent. Both employ the .NET Profiler interface, and only one profiler can be used at a time.

If you have both SCOM and the New Relic .NET agent installed on the same Windows server, disabling or turning off APM in SCOM will remove some Windows registry settings that are necessary for the .NET agent to work. The .NET agent will not be able to monitor web applications on that server.

For more help

Recommendations for learning more: