Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agents for .NET #376

Open
neoyagami opened this issue Dec 22, 2017 · 7 comments
Open

Agents for .NET #376

neoyagami opened this issue Dec 22, 2017 · 7 comments
Labels

Comments

@neoyagami
Copy link

Hi.
This proyect is awesome guys and looks like is what we where looking in regards of Java Apps, we also have some .NET apps lying arround and in a blog we read that there is a .NET experimental agent, is that true? if that the case , Where can we find it?

Thanks in advance.

@Henning-Schulz
Copy link
Member

Hi,
That's nice to hear! We do have an experimental .NET prototype. Please really consider it as a prototype and dont use it in production in the current state!
You can find the agent in my inspectIT fork in the branch dotNET: https://github.com/Henning-Schulz/inspectIT/tree/dotNet
Plase find the agent in the subfolder inspectit.net

@pperumala
Copy link

Hello @Henning-Schulz,

How do I make use of InspectIt .Net Agent? Could you please provide some instructions? I got the files and compiled the program. It generated the InspectITNetAgent.dll and I would like to know how to use it for IIS .NET applications.

Thanks,
Pramod

@Henning-Schulz
Copy link
Member

Hello @pperumala,

thanks for your interest in the .NET agent!

You have to register the agent .dll and then set some environment variables. Please refer to the Microsoft documentation for details: https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/profiling/setting-up-a-profiling-environment
For COR_PROFILER, you should use the profiler GUID in the Agent.h: DE04C0CC-3985-46C6-9446-BC329D5F159F
The registering can be done using the regsvr32 tool: https://en.wikipedia.org/wiki/Regsvr32

I hope I could help!
Henning

@pperumala
Copy link

Hi @Henning-Schulz,

Thank you for your response!

We have registered the .dll and added the environment variables, but we are still unable to see the agent connecting to the CMR. Are there any additional steps that I need to follow?

Thanks,
Pramod

@Henning-Schulz
Copy link
Member

Hi @pperumala,

registering the .dll properly can be tricky. Can you please double-check that you used the same version (32 or 64 bit) of the regsvr tool as your application? We also had issues in the past with a 32 bit application and the .dll registered with the 64 bit version of regsvr.

Another check you can do is to look at your application logs. Can you see any logs of the agent? If so, the agent was properly registered and only has issues in connecting to the CMR. In this case, please post the logs of the agent here.

Best,
Henning

@pperumala
Copy link

Hi @Henning-Schulz,

Here are the logs the I constantly keep getting.

  • .NET Runtime version 2.0.50727.8669 - Failed to CoCreate profiler.
  • .NET Runtime version 4.0.30319.0 - Loading profiler failed during CoCreateInstance. Profiler CLSID: '{DE04C0CC-3985-46C6-9446-BC329D5F159F}'. HRESULT: 0x80040154. Process ID (decimal): 6044. Message ID: [0x2504].

This is the method I used to register the .DLL

  • Copy all the files from Debug folder to "C:\Windows\SysWOW64"
  • run "C:\Windows\SysWOW64\regsvr32" InspectITNetAgent.dll

I get successful register message after that.

I also checked the registry (regedit.exe) for the registration of the .DLL and Object Profiler. These were created in the regedit right after registering the .DLL:
image

I also have IIS running with a web site setup. I believe that I have everything covered as per the instructions. Not sure if I am missing anything here.

Looking forward for your advice.

Thank you,
Pramod

@Henning-Schulz
Copy link
Member

Hi @pperumala,

Your method to register the .DLL looks good to me. I think the problem is related to an OS or .NET version conflict. As you already get (error) logs from the profiler, I don't think the issue is related to registering, but rather happens when your application tries to load the profiler.

The only idea I currently have is to download the inspectIT.NET source code and build the agent again.
The inspectIT.NET agent is only a prototype to see whether it is possible to extend inspectIT, which was built for Java, also for .NET. Therefore, the installation process is not as convenient as for Java and can also have bugs. At this point, let me again point out that you should please not use the inspectIT.NET agent prototype in prduction. It may break your application!

I hope this helps solving the issue and I'm happy to hear from you whether you were successful.

Best,
Henning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants
@neoyagami @Henning-Schulz @ivansenic @pperumala and others