What version of TLS does my C# program use?

后端 未结 3 2444
没有蜡笔的小新
没有蜡笔的小新 2021-02-20 07:00

I develop a C# program in Visual Studio 2013 which communicates with a SOAP webservice. How can I tell which version of TLS my program uses?

3条回答
  •  抹茶落季
    2021-02-20 07:56

    TLS 1.2 was added in .NET 4.5. The earliest supported .NET version is 4.5.2, so you won't have any issues if you use a supported version.

    .NET 4.6 uses TLS 1.2 by default. Earlier versions need this line to enable it :

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | 
                                           SecurityProtocolType.Tls11;
    

    TLS 1.0 is being phased out and SSL v3 is considered broken so they shouldn't be added.

提交回复
热议问题