dotMemory and dotTrace cannot attach to process running AppInsights

dotMemory and dotTrace cannot attach to process running AppInsights

When trying to attach dotMemory to my ASPNET Core app I get the following error:
NET Runtime version 4.0.30319.0 - Loading profiler failed. A profiler is already loaded, so the request to attach another profiler was denied. Process ID (decimal): 10824. Message ID: [0x2511].

My application is using AppInsights. It is configured in the ASPNET Core middleware and the AppInsights monitor is running on the server. Disabling the monitor did not allow the Jet Brains tools to attach to my application.

Below are the registry keys and values relating to profiling tools:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IISADMIN
Key: Environment

COR_ENABLE_PROFILING=1
COR_PROFILER={324F817A-7420-4E6D-B3C1-143FBED6D855}
MicrosoftInstrumentationEngine_Host={CA487940-57D2-10BF-11B2-A3AD5A13CBC0}

How can I disable AppInsights so that I can run the Jet Brains tools?

Thank you.

0
4 comments

More details: running on Windows Server 2019 x64, dotMemory and dotTrace are running as stand-alone tools.

0

Hello,

Please try our cleanup utility that cleans the registry and temporary files. Run cmd with administrator privileges, go to dotMemory or dotTrace installation folder (%localappdata%\JetBrains\Installations\dotMemory<vN>) and enter the command:

- CleanUpProfiler.x64.exe /r /t /i
- CleanUpProfiler.x86.exe /r /t /i

Restart dotMemory and your application after cleaning. Make sure that AppInsights monitor is still disabled.

0
 
Probably this workaround won't help because we investigated similar issue earlier and got the following results: some libraries from Microsoft Application Insights were loaded into IIS process even when the monitor was disabled.
 
Unfortunately, the only way to solve this issue we have found yet is to completely uninstall the Application Insight Status Monitor application from a machine, otherwise IIS will always be under monitoring/profiling. We can't guarantee that it is the only solution, so if you'll find another way to solve this issue please let us know.
0

Uninstalling the Application Insight Status Monitor on the server worked.  Thank you. 

0

Please sign in to leave a comment.