Performance profiler fails to attach to a .NET 4 process

snabisnabi Posts: 5
edited July 21, 2015 5:37PM in ANTS Performance Profiler 9
Guys.... it seems i have hit the dead end here

- Performance profiler as well as Memory profiler fail to attach to already running .Net 4 processes
- I have a .Net 4 process running on a 64-bit 2012 Windows Server R2
- RedGate profilers do see my running .NET processes but fails to profile it
- When i use "Attach to .Net 4+ process" to start profile my target process... it throws following exception
{code}There is already a profiler attached to this process.
at ??.?.??(Int32 , IEnumerable`1 )
at ?.?.?()

Caused by:

Exception from HRESULT: 0x8013136A
at ??.?.?.?(Int32 ?, Int32 ?, Guid ?, String ?, IntPtr ?, Int32 ?)
at ??.?.??(Int32 , IEnumerable`1 ){code}

- I made sure nothing else was attached to my target .Net 4 process
- As per this post "" ... "NTS Performance Profiler doesn't support 64-bit versions of Cassini correctly" ...but i am not using Cassini
- Work-around mentioned in above link talks about using "IIS Express (or full IIS)" ... not sure how this is done

***** Please help
Learning how to learn new things is the best lesson learned ever


  • Jessica RJessica R Posts: 1,226 Rose Gold 4

    Thanks for your post and sorry to hear you're experiencing an issue attaching to process!

    Can I please check--what type of application is the process you are trying to profile (i.e. web application, windows service, exe, etc...)?

    Similar to the post you linked to, can you kindly use Process Explorer to obtain the COR_ENABLE_PROFILING and COR_PROFILER values for the process? That should show us what the profiler thinks is attached to it. Please:

    - Download Process Explorer if you don't have it already - ... 96653.aspx
    - Open Process Explorer, and look for the process you are trying to profile
    - Right click on the process, click Properties and then click the Environment tab.
    - Look for the COR_ENABLE_PROFILING and COR_PROFILER variables and please let us know their values

    Thank you!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?

Sign In or Register to comment.