cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Environment Variable and Path for Self Contained Deployment for Asp.net Core 2.x Application

Abhinav.Galodha
Architect

I need a clarification regarding the Resolution of relative path to the profiler Dll while setting up the AppD Agent for the Asp.net core application in the environment variables

 

Our application uses SCD (Self contained Deployment) and is deployed in on Premise IIS Servers. My Question is regarding the Path location for the AppDynamics Profile dll (AppDynamics.Profiler_x86.dll, AppDynamics.Profiler_x64.dll) for Environment Variable CORECLR_PROFILER_PATH_32 and CORECLR_PROFILER_PATH_64.

 

Is AppDynamics able to resolve the relative path correctly if the value of the environment variable CORECLR_PROFILER_PATH_32  is ".\AppDynamics.Profiler_x86.dll"? 

 

The web.config looks like

 

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\Service.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" >
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Staging" />
<environmentVariable name="CORECLR_ENABLE_PROFILING" value="1" />
<environmentVariable name="CORECLR_PROFILER" value="{39AEABC1-56A5-405F-B8E7-C3668490DB4A}"/>
<environmentVariable name="CORECLR_PROFILER_PATH_32" value=".\AppDynamics.Profiler_x86.dll"/>
<environmentVariable name="CORECLR_PROFILER_PATH_64" value=".\AppDynamics.Profiler_x64.dll"/>
</environmentVariables>
</aspNetCore>
</system.webServer>
</configuration>

 

 

I am following the instructions at the link 

https://docs.appdynamics.com/display/PRO44/Install+the+.NET+Core+Microservices+Agent+for+Windows

As per the second instruction, we need to set the following environment variables and the path should be the Complete path. 

 

Set up your Environment Variables for your system application:

CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={39AEABC1-56A5-405F-B8E7-C3668490DB4A}
CORECLR_PROFILER_PATH_32=<actual_path>\AppDynamics.Profiler_x86.dll
CORECLR_PROFILER_PATH_64=<actual_path>\AppDynamics.Profiler_x64.dll

Where <actual_path> is the complete path to the AppDynamics.Profiler dll.

 

 

 

 

4 REPLIES 4

Ashish.Singh
AppDynamics Team

Hi Abhinav,

 

Yes, The relative path will also work and resolve correctly.

For example, if we use the below configuration in the Web.config file. It works and agent is able to instrument the application.

 

<environmentVariables>
<environmentVariable name="CORECLR_ENABLE_PROFILING" value="1" />
<environmentVariable name="CORECLR_PROFILER" value="{39AEABC1-56A5-405F-B8E7-C3668490DB4A}" />
<environmentVariable name="CORECLR_PROFILER_PATH_64" value=".\AppDynamics.Profiler_x64.dll" />
</environmentVariables>

Let us know if it helps or you have any question on this.

 

Thanks,

Ashish.



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Thanks Ashish for the prompt Response.

 

It might be helpful, if you could add this information in the docs. Another developer understood that only Absolute path is supported.

 

https://docs.appdynamics.com/display/PRO44/Install+the+.NET+Core+Microservices+Agent+for+Windows "Where <actual_path> is the complete path to the AppDynamics.Profiler dll."

 

Thanks,

Abhinav Galodha

Jeanie.Kedia
AppDynamics Team (Retired)

Thanks for the feedback @Abhinav.Galodha

Thanks Abhinav for the update.

 

In the document ( https://docs.appdynamics.com/display/PRO44/Install+the+.NET+Core+Microservices+Agent+for+Windows), the suggested Environment variables are for the System level. So there we need to provide the complete path. 

But when we configure these Environment variables at the specific application level and configure through web.config file. We can also give the relative path as suggested. it will also work.

 

We will share the suggestion with the document team to update this information.

 

Thanks,

Ashish.



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.