Application Insights for Web Server not getting Telemetry or Live Metrics Data
I did some digging to find that there was a certificate issue, along the lines of
Error: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
My other service instances show up in Azure App Insights just fine, only the Web instance is not showing. They both have the same certificates and security settings (Firewall off, no hardening enabled for dev). I think it may be that the App Insights Web Nuget package being the differentiator.
I did some testing to find that disabling cert validation on the Web source code works. Then I went to find that the "Digicert Global Root G2" was the certificate I was missing for the Web instance to send App Insights data. None of the other instances needs this cert, and "Digicert Global Root CA" exists already.
Was this caused from the Azure TLS cert changes from https://learn.microsoft.com/en-us/azure/security/fundamentals/tls-certificate-changes? Is there a way to check the .NET Microsoft.ApplicationInsights.Web Nuget package's TLS/SSL needs?