简体   繁体   English

WCF安全连接应使用TLS 1.2协议启动连接

[英]WCF secure connection should initiate connection with TLS 1.2 protocol

I am trying to achieve to have a server set up which will only provide secure connection with TLS 1.2 protocol. 我正在尝试实现一个服务器设置,该服务器仅提供TLS 1.2协议的安全连接。

On the server I disabled the the SSL 2, SSL 3, TLS 1.0. 在服务器上,我禁用了SSL 2,SSL 3,TLS 1.0。 By regedit using this way . 通过regedit 使用这种方式 I have a simple ASP.NET application and an _AppStart.cshtml file where I am logging what is happening. 我有一个简单的ASP.NET应用程序和一个_AppStart.cshtml文件,用于记录正在发生的事情。

This is the code and output I have now ( mostly got it from here ): 这是我现在拥有的代码和输出( 大部分是从这里获得的 ):

Log("SecurityProtocol: " +  System.Net.ServicePointManager.SecurityProtocol.ToString());
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; 
Log("SecurityProtocol: " +  System.Net.ServicePointManager.SecurityProtocol.ToString());

output: 输出:

-- Log: SecurityProtocol: Ssl3, Tls
-- Log: SecurityProtocol: Tls12

In the beginning somehow the value is still Ssl3, Tls 在开始时,值仍然是Ssl3,Tls

Is there any way to set up (maybe in web.config/app.config file) to initially start connection with forcing TLS 1.2? 有什么方法可以设置(也许在web.config / app.config文件中)以通过强制TLS 1.2初始开始连接?

One step would be achieving this by browsing this web application, another would be to have this working between a web- and application server with WCF. 一个步骤是通过浏览此Web应用程序来实现,而另一步骤是使此应用程序在具有WCF的Web服务器与应用程序服务器之间工作。 Any good pointers and ideas how to do this? 任何好的指示和想法如何做到这一点? I would appreciate any help! 我将不胜感激任何帮助!

See "Using TLS 1.2 with WCF" article by Benjamin Perkins: https://blogs.msdn.microsoft.com/benjaminperkins/2014/11/04/using-tls-1-2-with-wcf/ . 请参阅Benjamin Perkins的“在WCF中使用TLS 1.2”文章: https : //blogs.msdn.microsoft.com/benjaminperkins/2014/11/04/using-tls-1-2-with-wcf/ At the least .NET Framework 4.5 should be used and the following hotfix should be applied: https://support.microsoft.com/en-us/kb/2960358 至少应使用.NET Framework 4.5,并应应用以下修补程序: https : //support.microsoft.com/zh-cn/kb/2960358

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM