![](/img/trans.png)
[英]WebRequest fails over TLS 1.2 for Windows Server 2008 R2
[英]How can you tell what cipher version is used on Windows server 2008R2 for TLS 1.2
有人告訴我,https 端點支持以下密碼:
TLS 1.2(服務器優先順序的套件)
- TLS1.2_ECDHE_RSA_AES_128_GCM_SHA256
- TLS1.2_DHE_RSA_AES_256_GCM_SHA384
- TLS1.2_DHE_RSA_AES_128_GCM_SHA256
I have a Windows service in C# (.Net Framework 4.7.2) running on a Windows Server 2008R2 which will try to reach the https endpoint via a HttpClient PostAsync call.
如何判斷 Win2008r2 上是否啟用了任何密碼以及將使用哪些密碼?
我必須 state 的奇怪之處在於,在我的開發機器(Win10 x64)上,我可以毫無問題地到達 https 端點。 我在 Win2008r2 服務器上設置了適當的防火牆例外。
我一直在關注這個問題,檢查 Win2008r2 上的各種注冊表項,並在我的代碼庫中嘗試 ServicePointManager.SecurityProtocol(默認值、Tls12 等)的各種設置。
這是另一個嘗試找出為什么我的 Win10 開發機器可以工作而 Win2008R2 不能工作的努力。
順便說一句,這是我從 Win2008r2 服務器得到的錯誤:
無法建立連接,因為目標機器主動拒絕它 xxx.xxx.xx.xxx:443
感謝 Crowcoder 指出之前關於 .Net Tracing 的文章。 我將這兩個類包含在我的代碼中,並且能夠清楚地看到我正在使用的跟蹤和 tls 版本:
System.Net 信息:0:[25532] ConnectStream#62696216::ConnectStream(緩沖 -1 字節。) System.Net 信息:0:[25532] 將 HttpWebRequest#36963566 與 ConnectStream#62696216 關聯 System.Net 信息:0:[25532 ] 將 HttpWebRequest#36963566 與 HttpWebResponse#31071611 關聯 System.Net 信息:0:[25532] ContentLength=-1 System.Net 信息:0:[25532] TlsStream#63566392::.ctor(host=xxx.yyyyzzz.com, # certs=0, checkCertificateRevocationList=False, sslProtocols=Default, Tls12 ) System.Net 信息: 0: [25532] 將 HttpWebRequest#57416410 與 ConnectStream#24004906 關聯 System.Net 信息: 0: [25532] HttpWebRequest#57416410 - 請求: POST /導入分配 HTTP/1.1
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.