You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows Server 2008 R2中SSL/TLS安全通道创建失败问题求助

问题汇总

SSL/TLS安全通道创建失败问题

在Windows Server 2008 R2环境中执行指定C#代码时,抛出错误:The request was aborted: Could not create SSL/TLS secure channel。

  • 已在系统中启用TLS 1.1和1.2,但使用IE访问同一URL时,仍提示TLS 1.1、1.2未启用。
  • 涉及技术:HttpWebRequest、HttpClient、WebRequest

执行的C#代码

string sURL = "https://connect.medlineplus.gov/service?mainSearchCriteria.v.cs=2.16.840.1.113883.6.88&mainSearchCriteria.v.c=897294&knowledgeResponseType=application/json";

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
WebRequest request = WebRequest.Create(sURL);
request.Credentials = CredentialCache.DefaultCredentials;

request.Method = "GET";

WebResponse response = request.GetResponse();

// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream();

// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);

// Read the content.
sReponseInJson = reader.ReadToEnd();
dataStream.Close();

WebView2相关疑问

能否通过WebView2实现上述请求与响应的处理?

补充说明

medlineplus.gov已完成密码安全相关更改,目前该请求可在Windows Server 2008 R2上正常运行。


内容的提问来源于stack exchange,提问作者Abhishek Avadhoot

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.17 00:57:12