The SSL connection could not be established raised in Azure Function App

333 Views Asked by At

We have SonarQube which is accessible only in our network. And I am trying to call the SonarQube API using HTTPClient in a Azure Function App application developed with c# code (.Net 8). And Azure Function App was created in Azure under Private endpoint. After deployment the code is not working and throwing exception as below.

"The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain"

Some sites suggesting to use HttpClientHandler with ServerCertificateCustomValidationCallback method to return true. But it is recommended for production use.

So please let me know the permanent solution for this issue.

Thanks.

0

There are 0 best solutions below