EF Core .Net 8 error after TLS 1.0 was disabled.

Lange Gregory 20 Reputation points
2023-12-05T17:06:22.9333333+00:00

The admins where I work have disabled TLS 1.0 but now all of a sudden, my .Net 8 app is getting the following error:

Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
       ---> System.Security.Authentication.AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.

Why would I be getting this as I do not specify which TLS version to use and to my understanding .Net 8 EF Core uses latest unless you specify a version. Or is this an issue somewhere else? The specific WebAPI app is using AzureAD for Authentication.

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
753 questions
{count} votes

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.