HTTPS 客戶端/服務器通信錯誤:底層連接已關閉:發送時發生意外錯誤 (HTTPS Client/Server Communication Error: The underlying connection was closed: An unexpected error occurred on a send)


問題描述

HTTPS 客戶端/服務器通信錯誤:底層連接已關閉:發送時發生意外錯誤 (HTTPS Client/Server Communication Error: The underlying connection was closed: An unexpected error occurred on a send)

在將 XML 發送到端口 443 上的 HTTPS 偵聽器時,我收到以下錯誤。偵聽器(C# 控制台應用程序)僅使用客戶端發送的相同 XML 進行響應(一個簡單的 win 表單應用程序)。如果我將偵聽器應用程序更改為 HTTP 而不是 HTTPS,則應用程序可以正常通信。理想情況下,此應用程序將跨網絡運行。我已經嘗試將偵聽器應用程序託管在另一台服務器上,因此客戶端必須訪問網絡並將偵聽器加載到與客戶端相同的機器上。我正在嘗試消除任何編碼問題,以便將其交給我們的網絡人員,但我覺得他們需要指出一個方向。

Inner Exception: {"Unable to read來自傳輸連接的數據:


參考解法

方法 1:

Code wise, there is nothing wrong with what's shown in the OP. The problem is with using HTTPS without a signed certificate. After I created a self signed certificate and bound it to the port I was using (port 443), the application gladly accepted HTTPS requests.

The recommendations here will show how to correct the issue step by step:

https://stackoverflow.com/questions/11403333/httplistener‑with‑https‑support#=

(by RafikiRafiki)

參考文件

  1. HTTPS Client/Server Communication Error: The underlying connection was closed: An unexpected error occurred on a send (CC BY‑SA 2.5/3.0/4.0)

#HTTPS #SSL #C#






相關問題

如何信任特定的自簽名證書?(不相信所有人) (How can I trust a specific self-sign certificates? (Not trust all))

使用 Dotnet 客戶端與 Java 服務器進行 Https 通信 (Https Communication to Java Server with Dotnet Client)

在 ssl 站點中啟用 http 小書籤? (Enable http bookmarklet in ssl site?)

HTTPS 客戶端/服務器通信錯誤:底層連接已關閉:發送時發生意外錯誤 (HTTPS Client/Server Communication Error: The underlying connection was closed: An unexpected error occurred on a send)

node.js https 沒有響應“結束”事件,而是“關閉”? (node.js https no response 'end' event, 'close' instead?)

在 IIS 7.5 上運行的 ASP.NET 應用程序上強制使用 Https (Force Https on an ASP.NET app running on IIS 7.5)

通過http實現安全性的最佳方式是什麼 (What's the best way to implement security through http)

如何使用身份驗證 API 觸發密碼重置流程、python 或 curl (How to use the authentication API to trigger password reset flow, python or curl)

C#:強制 TLS1.2 但 Https 服務器仍然給出常見算法錯誤 (C#: Forcing TLS1.2 but Https server still giving common algorithm error)

curl 在我的共享主機上無法正常工作 (curl not working in the right way on my shared hosting)

如何為通過 Kestrel 服務器託管 PWA 的 UWP 桌面橋應用配置 https (How to configure https for a UWP Desktop Bridge app hosting a PWA via a Kestrel Server)

從其他機器訪問 webpack DevServer 子 URL 時出現 ERR_SSL_PROTOCOL_ERROR (ERR_SSL_PROTOCOL_ERROR when accessing webpack DevServer sub-URLs from a different machine)







留言討論