请求已中止:无法创建SSL/TLS安全通道,但可以使用浏览器/ POSTMAN

Mik*_*ynn 9 .net c# ssl https

我有点迷失在这里.添加ServicePointManager的东西通常会解决这个问题,但这次我不断收到错误.我的服务器可以从浏览器和POSTMAN访问相同的URL.但是通过网站运行这个失败了.这虽然适用于我的本地计算机.我在服务器上启用了TLS 1.1和TLS 1.2.

我的服务器TLS设置有什么问题吗?https://www.ssllabs.com/ssltest/analyze.html?d=basketball.exposureevents.com

我使用的是CertifyTheWeb证书,基本上是免费的SSL.不确定这是否与它有关.

我发送到下面的链接,从IIS下面的代码作出拒绝请求.

https://www.nationalsportsid.com/tournament/6028

消息:请求已中止:无法创建SSL/TLS安全通道.来源:系统堆栈跟踪:在System.Net.HttpWebRequest.GetResponse()处

ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;

var webRequest = (HttpWebRequest) WebRequest.Create("https://www.nationalsportsid.com/tournament/" + nationalSportsId);
try
{
    using (var webResponse = (HttpWebResponse) webRequest.GetResponse())
    {
        if (webResponse.StatusCode == HttpStatusCode.OK)
        {
            return true;
        }
    }
}
catch (WebException ex)
{
    Logger.Error(ex);
}
Run Code Online (Sandbox Code Playgroud)

这是Message Analyzer记录的内容

握手

在此输入图像描述

警报

在此输入图像描述

Mik*_*ynn 2

这是 Apache 另一台服务器上的配置问题。他们放松了 SSL 配置,我不确定他们做了什么,但他们之前的配置如下。我现在可以向他们的服务器发出 HTTP 请求。

SSLEngine on

# Intermediate configuration, tweak to your needs
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE$
SSLHonorCipherOrder on
SSLCompression off

SSLOptions +StrictRequire
Run Code Online (Sandbox Code Playgroud)