Docker deployment. Net5 connection to SqlServer error: 31handshake failed

created at 08-18-2021 views: 4

To solve this problem, the root cause of the problem is that .net5 does not support the configuration of CipherString = DEFAULT@SECLEVEL=2.
SECLEVEL=2 does not work, change it to 1, so set CipherString = DEFAULT@SECLEVEL=1. After the modification, restart the container and try again, the problem still exists. 

Later research found that
MinProtocol = TLSv1.0, there are some problems with TLSv1.0 in this configuration, so I changed TLSv1.0 to TLSv1, .0 is no longer needed, restart the container and try again.

How to modify the value of SECLEVEL is actually very simple. The principle is the same as modifying TLSv1.2. Some friends can also use the docker copy command to copy the modified file to the container and replace it.

created at:08-18-2021
edited at: 08-18-2021: