It could be a bug of Microsoft.ApplicationInsights.AspNetCore version 2.17.0.
If you update to the latest version it should disappear.
AppInsights TelemetryClient throws exception
I am getting the following exception in ASP.NET core mvc application when deployed in docker (ubuntu) in Azure.
System.ArgumentException: The specified configuration does not have a telemetry channel. (Parameter 'configuration')
at Microsoft.ApplicationInsights.TelemetryClient..ctor(TelemetryConfiguration configuration)
I have added the following piece of code in the startup.cs
services.AddSingleton(typeof(ITelemetryChannel), new ServerTelemetryChannel());
services.AddApplicationInsightsTelemetry();
Can you please guide me why this error is occuring? Its working perfectly in development environment when run from VS
2 answers
Sort by: Most helpful
-
Stefano Demiliani 166 Reputation points MVP
2022-10-19T12:20:01.437+00:00 -
Marwa Abouawad 286 Reputation points Microsoft Employee
2022-10-20T04:12:49.617+00:00 Welcome to Microsoft Q & A community Forum!
Please refer to this Github discussion about the same issue https://github.com/microsoft/ApplicationInsights-dotnet/issues/2195
The issue should be resolved if you update to the latest version.
If the answer was helpful, to benefit the broader community, please feel free to mark as answered.