![](/img/trans.png)
[英]Could not create SSL/TLS secure channel error during TLS 1.2 connection when not in admin mode
[英]WCF secure connection should initiate connection with TLS 1.2 protocol
我正在嘗試實現一個服務器設置,該服務器僅提供TLS 1.2協議的安全連接。
在服務器上,我禁用了SSL 2,SSL 3,TLS 1.0。 通過regedit 使用這種方式 。 我有一個簡單的ASP.NET應用程序和一個_AppStart.cshtml文件,用於記錄正在發生的事情。
這是我現在擁有的代碼和輸出( 大部分是從這里獲得的 ):
Log("SecurityProtocol: " + System.Net.ServicePointManager.SecurityProtocol.ToString());
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Log("SecurityProtocol: " + System.Net.ServicePointManager.SecurityProtocol.ToString());
輸出:
-- Log: SecurityProtocol: Ssl3, Tls
-- Log: SecurityProtocol: Tls12
在開始時,值仍然是Ssl3,Tls
有什么方法可以設置(也許在web.config / app.config文件中)以通過強制TLS 1.2初始開始連接?
一個步驟是通過瀏覽此Web應用程序來實現,而另一步驟是使此應用程序在具有WCF的Web服務器與應用程序服務器之間工作。 任何好的指示和想法如何做到這一點? 我將不勝感激任何幫助!
請參閱Benjamin Perkins的“在WCF中使用TLS 1.2”文章: https : //blogs.msdn.microsoft.com/benjaminperkins/2014/11/04/using-tls-1-2-with-wcf/ 。 至少應使用.NET Framework 4.5,並應應用以下修補程序: https : //support.microsoft.com/zh-cn/kb/2960358
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.