question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to connect to TLS 1.2 enabled Sql Server from .Net Core client

See original GitHub issue

Hi,

I have got a client (container application) in .net core and trying to connect to TLS 1.2 enabled Sql server.

When the Sql server was not configured the client can talk to database but after enabling TLS 1.2 it started throwing below error:

Error: The connection is broken and recovery is not possible. The client driver attempted to recover the connection one or more times and all attempts failed. Increase the value of ConnectRetryCount to increase the number of recovery attempts. at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) — End of stack trace from previous location where exception was thrown

Can you please assist on this?

Thanks, Muhammad Masood

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
m4masoodcommented, Sep 2, 2019

Hi, It can talk to database server with TLS 1.2 enabled. Here is part of my Dockerfile:

COPY ./Certificates/db.cer /etc/pki/ca-trust/source/anchors/db.cer RUN update-ca-trust

Thanks, Muhammad Masood

1reaction
m4masoodcommented, Aug 9, 2019

Hi, I followed https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-encrypted-connections?view=sql-server-2017 and added CA signed cert to the container and it can talk to database now. But currently server is not forcing for TLS 1.2 (it is enabled) so I am waiting for dba to make this happen in database and see how container will behave after that. I will update you guys.

Thanks a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TLS 1.2 support for Microsoft SQL Server
This article provides information about the updates that Microsoft releases to enable TLS 1.2 support for SQL Server.
Read more >
How to enable TLS 1.2 in Asp.Net Core 3.1
I take look over configuration options and found that by default ASP.NET Core 3.1 uses TLS 1.1 and TLS 1.2 for requests. So,...
Read more >
TLS 1.2 and .NET Support: How to Avoid Connection Errors
I recently ran into an interesting issue when developing a connector for a third-party API. When trying to connect to the API endpoint, ......
Read more >
Enabling TLS 1.2 on your .NET application | by Dominic Burford
I recently came across an issue with several of our ASP.NET WebAPI services which were consuming a third-party set of APIs.
Read more >
Enforcing a minimum TLS version in the AWS SDK for .NET
Learn how to enforce TLS 1.2 in the AWS SDK for .NET.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found