Issues connecting deployed .NET Core 6 API to Azure Database for MySQL via SSL

bisondev 26 Reputation points
2022-01-14T04:56:26.59+00:00

Hi,

I have a .NET Core 6 API that I've deployed to and hosted on an Azure App Service for Windows. I've also set up an Azure Database for MySQL service as well, and I am attempting to connect these services via SSL. I've set up application insights for my API so I can see errors that happen within the API. When I try to hit an endpoint that accesses the database, I see the following error from Application Insights:

165015-appinsightserror.png

Here is a more detailed description of the error:

165041-appinsightserrordescription.png

Any help is appreciated! I've been searching for a long time and have looked at all sorts of documentation and can't find anything helpful here. Thank you!!

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,510 questions
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
809 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,652 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Zhi Lv - MSFT 32,146 Reputation points Microsoft Vendor
    2022-01-17T02:41:13.973+00:00

    Hi @bisondev ,

    From the error message, we can see that the application cannot find the certificate file. When configure SSL connectivity in your application, have you ever configured SSL certificate, and whether the certificate is validated or not and the file path is correct? You can check it.

    Here are some relates articles, you can refer to them:

    Configure SSL connectivity in your application to securely connect to Azure Database for MySQL

    Understanding the changes in the Root CA change for Azure Database for MySQL Single Server

    Best regards,
    Dillion

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.