简体   繁体   English

IIS 2019:请求被中止:无法创建 SSL/TLS 安全通道

[英]IIS 2019: The request was aborted: Could not create SSL/TLS secure channel

I've seen others post similar issues and go down the route of using the following code snippet我看到其他人在使用以下代码片段的过程中发布了类似的问题和 go

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

However, I'm still having issues with the following scenario.但是,我仍然遇到以下情况的问题。

I have a Web App running on IIS on Windows Server (An EC2 Instance Win 2019 Server) and a Microservice running on Kestrel.我有一个 Web 应用程序在 Windows 服务器(一个 EC2 实例 Win 2019 服务器)上的 IIS 上运行,还有一个在 Kestrel 上运行的微服务。 If I RDP to the Win Server and open up Chrome/Firefox/Edge I can navigate to the micro-service, make a basic API call and see data come back.如果我 RDP 到 Win 服务器并打开 Chrome/Firefox/Edge,我可以导航到微服务,进行基本的 API 调用并查看数据返回。 However, when the IIS application tries to access the the API I get the following error in my logs但是,当 IIS 应用程序尝试访问 API 时,我在日志中收到以下错误

 InnerException:
        >       Type:       HttpRequestException
        >       Message:    An error occurred while sending the request.
        >       Data:       0 entries
        >       Stack trace:
 ---------------- InnerException: Type: WebException Message: The request was aborted: Could not create SSL/TLS secure >channel. Data: 0 entries Stack trace:
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
                        InnerException is null

The certificate is valid/trusted/secured.证书有效/可信/安全。 So there's no issue there.所以那里没有问题。

I'm assuming that when the request goes from the Web App in IIS and tries to reach out to the API, it doesn't like something?我假设当请求从 IIS 中的 Web 应用程序发出并尝试联系 API 时,它不喜欢什么? Is there a way to get further info on why I'm getting the exception(s)有没有办法获得有关我为什么会出现异常的更多信息

Looks like this was the answer https://trailheadtechnology.com/solving-could-not-create-ssl-tls-secure-channel-error-in.net-4-6-x/看起来这就是答案https://trailheadtechnology.com/solving-could-not-create-ssl-tls-secure-channel-error-in.net-4-6-x/

I hope this saves someone some time and headaches我希望这可以节省一些时间和头痛

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 请求已中止:无法创建SSL / TLS安全通道 - SecurityProtocol行为 - The request was aborted: Could not create SSL/TLS secure channel - SecurityProtocol behavior .NET请求已中止:无法创建SSL / TLS安全通道 - .NET The request was aborted: Could not create SSL/TLS secure channel WebException:请求已中止:无法创建SSL / TLS安全通道 - WebException: The request was aborted: Could not create SSL/TLS secure channel 请求已中止:无法创建SSL / TLS安全通道异常 - The request was aborted: Could not create SSL/TLS secure channel Exception HttpWebRequest:请求已中止:无法创建SSL / TLS安全通道 - HttpWebRequest: The request was aborted: Could not create SSL/TLS secure channel 请求被中止:无法创建 SSL/TLS 安全通道 - The request was aborted: Could not create SSL/TLS secure channel HttpClientHandler / 请求被中止:无法创建 SSL/TLS 安全通道 - HttpClientHandler / The request was aborted: Could not create SSL/TLS secure channel 服务器错误:请求已中止:无法创建SSL / TLS安全通道 - Server Error: The request was aborted: Could not create SSL/TLS secure channel RestSharp 请求中止 - 无法创建 SSL/TLS 安全通道 - RestSharp request aborted - could not create SSL/TLS secure channel 该请求已中止:无法为HttpWebRequest创建SSL / TLS安全通道 - The request was aborted: Could not create SSL/TLS secure channel for HttpWebRequest
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM