Overview
We have a .NET Core Web API (.Net 6) deployed as an Azure Web App & we are attempting to connect to an On Prem SQL Server. It is very simple API. One endpoint. It simply connects to our On Prem DB, retrieves & returns a single value.
We took the exact same API & deployed it:
- To a Azure Web App deployed with a Windows App Service Plan.
- To a Azure Web App deployed with a Linux App Service Plan.
We have whitelisted the Outbound IP's of the corresponding Azure Web API's to avoid firewall issues.
The Problem
The API deployed to the Window App Service Plan has no issue connecting and querying the On Prem Database. The same API deployed to the Linux App Service Plan, however, results in the following error when we attempt to connect & run a query:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 31 - Encryption(ssl/tls) handshake failed)
Does anyone have any idea why we would be running into issues on Linux and not on Windows and what we might need to look at in order to allow both access?
Related Posts
- SQL Server Pre-Login Handshake (error: 31 - Encryption(ssl/tls) handshake failed) - We have TLS 1.2 support on prem, additionally our connection string specifies "TrustServerCertificate=True"
- A connection was successfully established with the server, but then an error occurred during the pre-login handshake - We have tried redeploying the app & restarting the app. We tried "Encrypt=False" in the connection string, we also do not have "Persist Security Info=True". We are using the actual IP of our on Prem Server, no naming.