Here are a few options for a question-style title based on your article: Focused on the Issue: * Azure SQL Database v12 Upgrade: Why Am I Getting a \'TLS Handshake Failed\' Error? * TLS Ha

Mary-Kate Olsen
Release: 2024-10-27 11:52:02
Original
647 people have browsed it

Here are a few options for a question-style title based on your article:

Focused on the Issue:

* Azure SQL Database v12 Upgrade: Why Am I Getting a

TLS Handshake Error in Azure SQL Database After v12 Upgrade

Since upgrading to v12, users accessing Azure SQL Database from Azure Web Apps may encounter a "TLS Handshake failed" error. This error stems from a certificate mismatch between the web app's connection string and the database server.

The issue arises from the updated TLS configuration in v12, which requires a connection string that explicitly trusts the server certificate and specifies the hostname included in the certificate.

Solution

To resolve this error, modify the connection string in your web app to include the following parameters:

  • TrustServerCertificate=True: This instructs the client to trust the server certificate, even if it is not issued by a trusted CA.
  • hostNameInCertificate=*.database.windows.net: This specifies the hostname included in the server certificate.

Example Connection String

Here is a modified connection string that should resolve the error:

Server=[server-name].database.windows.net;Port=1433;Database=[dbname];User
ID=[user];Password=[pass];Trusted_Connection=False;Encrypt=True;Connection
Timeout=30;TrustServerCertificate=True;hostNameInCertificate=*.database.windows.net
Copy after login

Note: The Azure portal suggests using the TrustServerCertificate=False setting. However, this may not be compatible with the updated TLS configuration in v12.

The above is the detailed content of Here are a few options for a question-style title based on your article: Focused on the Issue: * Azure SQL Database v12 Upgrade: Why Am I Getting a \'TLS Handshake Failed\' Error? * TLS Ha. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!