Search code examples
visual-studio-2017.net-4.7tls1.0

Why is Visual Studio 2017 using TLS 1.0?


New install of Visual Studio 2017 Enterprise on a Windows 7 box.

Http requests in an NUnit test project (targeting .NET 4.7) are using TLS 1.0 and failing because the server requires 1.1 or better.

Yet the same test project (targeting .NET 4.6.1) previously worked fine in Visual Studio 2015 on the same machine. I don't have records to tell me if it was using TLS 1.1 or 1.2, but it was working. No changes to the project in the interim had anything to do with SSL/TLS.

Furthermore, the same test project works fine on another machine with VS 2017 Enterprise and Windows 10.

How can this be? Where can I find and/or set the configuration for which SSL/TLS version is used by default?


Solution

  • .Net Framework 4.7 will use the default TLS version for the specific Windows.

    TLS Version now matches Windows
    Network security is increasingly important, particularly for HTTPS. We’ve had requests for .NET to match the Windows defaults for TLS version. This makes machines easier to manage.

    So, make sure you have the TLS update installed and configured the default value to use TLS 1.2.