1
votes

I'm trying to migrate my C# web application to a production instance that runs on windows server 2012 R2. When I try to browse the application via IIS I receive this strange error "The client and server cannot communicate, because they do not possess a common algorithm" and I'm not entirely sure what it means.

I read some other questions online similar to mine and they stated the problem stems from incompatibility issues with SSL/TLS. I believe my new server uses TLS 1.2 after checking in regedit and locating what I assume is my TLS certificates. My application encounters this error whenever it tries to connect to a DB that runs on a SQL Server 2008 DB system located on a different instance. Where my website is currently hosted, it's not having any issues (it's running on a Windows Server 2008 R2 instance).

My question is, do you know where I can locate what security certificates my App on the production server and my SQL Server DB instance, and do they have to be similar to solve this "The client and server cannot communicate, because they do not possess a common algorithm" error. Any help will be greatly appreciated.

1
What is your version of .NET? Related question: stackoverflow.com/questions/26742054/…Alex
I believe I'm using .NET version 4.5, but I'm not positive of where to check it.msleone
Google is your friendAlex
Just checked, 4.5msleone
Another thing I noticed is that my new production box has .NET version 4.6.1 installed while, the box hosting my DB has .NET version 4.5.1 installed. Would that make a difference?msleone

1 Answers

1
votes

Upgrade your project to use ASP.NET 4.6 or higher or use the following code on ASP.NET 4.5

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; // .NET 4.5
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; // .NET 4.0

ASP.NET 4.6 automatically uses TLS 1.2 if its available.