Issue in Connecting to SQL Server 2008 R2 from .Net application on a different Server

38 views Asked by At

I am trying to fetch data from SQL Server 2008 R2 residing on a server(I do not have access to this server to make any changes). The application I developed to fetch data is a simple .net 4.5 console application hosted on a server where I have a full control of. Below is the error I am getting:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The client and server cannot communicate, because they do not possess a common algorithm.)

Any suggestion to establish the connection from the application server side?

I have tried all the below,but no luck:

  1. Tried all the below attributes:

    • Encrypt
    • TrustServerCertificate
    • Trusted_Connection
  2. Tried below on the application side:

    ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;

  3. Tried using below on the web.config

    <AppContextSwitchOverrides value="Switch.System.Net.DontEnableSystemDefaultTlsVersions=false"/>

1

There are 1 answers

0
SAM On

Issue was resolved by enabling the TLS1.0 on the server where I had control of.