A
A
Alexander Nikulshin2021-04-13 20:24:47
ASP.NET
Alexander Nikulshin, 2021-04-13 20:24:47

How to fix error when connecting to MS SQL Server in ASP Net Core application on Ubuntu?

Hosted an ASP Net Core application on ubuntu 20.10. I start and at the moment when I need to connect to the database, an error occurs:

SqlException: 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)


Communication with the database is organized through the Entity Framework. Connection string: Server=172.172.172.120;Database=clients_si;User Id=*****;Password=******;
Although on a windows machine everything works fine. Please tell me how to fix this error?

6075d3b768631853439508.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
cicatrix, 2021-04-14
@cicatrix

According to this post:

(provider: SSL Provider, error: 31 - Encryption(ssl/tls) handshake failed

It is possible that the system lacks the necessary trusted certificate.

M
Mikhail Vasilyev, 2021-04-13
@vasilyevmn

Read:
https://docs.microsoft.com/en-us/sql/connect/ado-n...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question