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

Asp.net core is not getting registered with the controller

Virsec.Ops
New Member

Hi There, 

 

I followed this article

https://community.appdynamics.com/t5/Knowledge-Base/How-do-I-install-the-NET-Core-Microservices-Agen...

 and instrumented one of my asp.net core application, I see profiler logs and agent logs are getting generated when I access the app. In the AgentLog.txt, I see the below error message and I could not see any metrics in the dashboard

 

I tried using global-account-name with accesskey as the password then I tried account name and access key combination but none of them worked.. One 

Webapplication with normal asp.net worked fine and its log does not show this error using same controller with same access credentials, I see only issue with asp.net core

 

2022-01-18 13:56:12.4240 22660 w3wp 1 6 Warn ConfigurationChannel Could not connect to the controller/invalid response from controller, cannot get initialization information, controller host [theater202201112310492.saas.appdynamics.com], port[443], exception [AppDynamics.Controller_api.Communication.Http.HttpCommunicatorException: Failed to execute request to endpoint [https://theater202201112310492.saas.appdynamics.com/controller/instance/0/applicationConfiguration_P...]. Unexpected response status code [Unauthorized].
at AppDynamics.Controller_api.Communication.Http.HttpClientHttpCommunicator.Send(Byte[] data, Uri relativeUri, String method, String contentType, Dictionary`2 additionalHeaders, Dictionary`2 additionalSecuredHeaders, String userAgent, Func`3 processResponse, Int32 timeout)
at AppDynamics.Controller_api.Communication.Http.HttpCommunicator.Send(Byte[] data, Uri relativeUri, String method, String contentType, Action`1 processResponse, Int32 timeout)
at AppDynamics.Controller_api.Communication.Http.HttpCommunicatorExtensions.Send(HttpCommunicator communicator, ProtobufPayload payload, Uri uri)
at com.appdynamics.ee.rest.controller.request.AProtoBufControllerRequest.sendRequest()]
2022-01-18 13:56:12.4240 22660 w3wp 1 6 Error ConfigurationChannel Exception: Failed to execute request to endpoint [https://theater202201112310492.saas.appdynamics.com/controller/instance/0/applicationConfiguration_P...]. Unexpected response status code [Unauthorized]. Exception: AppDynamics.Controller_api.Communication.Http.HttpCommunicatorException: Failed to execute request to endpoint [https://theater202201112310492.saas.appdynamics.com/controller/instance/0/applicationConfiguration_P...]. Unexpected response status code [Unauthorized].
at AppDynamics.Controller_api.Communication.Http.HttpClientHttpCommunicator.Send(Byte[] data, Uri relativeUri, String method, String contentType, Dictionary`2 additionalHeaders, Dictionary`2 additionalSecuredHeaders, String userAgent, Func`3 processResponse, Int32 timeout)
at AppDynamics.Controller_api.Communication.Http.HttpCommunicator.Send(Byte[] data, Uri relativeUri, String method, String contentType, Action`1 processResponse, Int32 timeout)
at AppDynamics.Controller_api.Communication.Http.HttpCommunicatorExtensions.Send(HttpCommunicator communicator, ProtobufPayload payload, Uri uri)
at com.appdynamics.ee.rest.controller.request.AProtoBufControllerRequest.sendRequest()

1 REPLY 1

Sarabjit.Tatra
AppDynamics Team

@Virsec.Ops - Starting with .Net msi agent version 20.3.x, the .NET Agent MSI installer for Windows now includes support for .NET Core applications, enabling unified management of .Net Core and full framework applications on Windows. The agent monitors .NET Core applications for IIS out of the box, if automatic IIS mode is configured. So we would recommend to install the latest 21.x agent and validate the behavior.

  • The MSI Installer bundles .NET Core agent with the existing .NET framework agent and creates appropriate environment variables. 
  • Supported environments are identical to the previous .NET Agent. 
  • .NET Core versions 2.0 and later are supported.
  • IIS-hosted .NET Core applications are monitored similar to the .NET frameworks configured in automatic mode
  • You can configure .NET Core applications in the config.xml file, just as you would configure .NET framework applications. 

You have to manually configure .NET Core applications in the config.xml file in either of the following scenarios:

 

  • You monitor ASP .NET core applications that are not hosted in-process, but are hosted in dotnet.exe
  • You currently monitor standalone applications

 

So can you remove the Micro Services agent related configuration and try instrumenting with latest MSI agent available on download.appdynamics.com for the respective .net core sites. Make sure to configure the sites manually in config.xml and provide same tier and node names so that it should start reporting under the same node. Also make sure at system level CORECLR_PROFILER is needed to be set to "AppDynamics.AgentProfiler" for msi agent to instrument the .net core applications. 

 

Please restart Appdynamics Coordinator Service and following that please restart IIS and apply fresh load on the applications and let us know the behavior ?

 

Let us know if you still face any issues.