为整个项目定义TLS 1.2 [英] Defining TLS 1.2 for the whole project

查看:92
本文介绍了为整个项目定义TLS 1.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

非常感谢您协助如何执行此操作。

I would appreciate your assistance in how to perform this.

我的项目需要符合TLS 1.2标准(目前正在使用1.1)并且不幸的是它使用1.1进行通信。

My project needs to be TLS 1.2 compliant (currently using 1.1) and unfortunately it uses 1.1 for communications.

这会阻止与仅允许TLS 1.2协议的服务器的连接。

This blocks connections to servers which only allow TLS 1.2 protocols.

仅限任何方式在Visual Studio 2016中允许使用TLS 1.2(该网站在visual studio上运行)

any way only allow TLS 1.2 this in visual studio 2016(the site runs on visual studio)

谢谢!

推荐答案

你好Duke_Tar,

Hi Duke_Tar,

欢迎来到MSDN论坛。

Welcome to MSDN forum.

据我所知,您可以使用ServicePointManager类指定应用程序支持的协议,特别是通过设置SecurityProtocol属性,在您的情况下,您可以将其设置为以下内容:

As far as I know, you can specify which protocols your application supports by using the ServicePointManager class, specifically by setting the SecurityProtocol property, which in your case you would want to set to the following:

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

如需更多信息,请查看以下主题:

For some more info, please check this thread:

https://stackoverflow.com/questions/26389899/how- do-i-disable-ssl-fallback-and-use-only-tls-for-outbound-connections-in-net

希望这会有所帮助。


这篇关于为整个项目定义TLS 1.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆