[英]ASP.Net Core API won't work using SSL browser throws ERR_CONNECTION_RESET
I'm building an API in Visual Studio using ASP.NET Core Web Application, but since a couple of days ago it doesn't work anymore.我正在使用 ASP.NET 核心 Web 应用程序在 Visual Studio 中构建 API 应用程序,但几天前它不再工作了。 When I run the API from Visual Studio using IIS Express I get an error in the browser: "ERR_CONNECTION_RESET".当我使用 IIS Express 从 Visual Studio 运行 API 时,我在浏览器中收到错误:“ERR_CONNECTION_RESET”。
The application does work when I disable SSL, but it should (and before did) work with SSL enabled.当我禁用 SSL 时,该应用程序确实可以工作,但它应该(和之前)在启用 SSL 的情况下工作。
Things I've tried:我尝试过的事情:
System Time: 18/06/2020 14:40:58 Processor Architecture: AMD64 OS: Microsoft Windows NT 10.0.18363.0 Server Type: IIS Express SERVER SSL PROTOCOLS PCT 1.0: PCT 1.0 is not secure. OS default is used. You might explicitly disable it via registry. SSL 2.0: SSL 2.0 is not secure. OS default is used. You might explicitly disable it via registry. SSL 3.0: SSL 3.0 is not secure. OS default is used. You might explicitly disable it via registry. TLS 1.0: TLS 1.0 is not secure. OS default is used. You might explicitly disable it via registry. TLS 1.1: TLS 1.1 is not secure. OS default is used. You might explicitly disable it via registry. TLS 1.2: SChannel EventLogging: 1 (hex) To tune TLS related settings, please follow https://support.microsoft.com/en-us/kb/187498 or try out IIS Crypto from https://www.nartac.com/Products/IISCrypto/. Microsoft documentation on cipher suites can be found at https://docs.microsoft.com/en-us/windows/desktop/secauthn/cipher-suites-in-schannel. ----- [W3SVC/1] ServerComment: WebSite1 ServerAutoStart: True ServerState: Stopped BINDING: http *:8080:localhost
For what it's worth I've also checked for the subkeys through Regedit, but couldn't find the subkeys inside HKey_Local_Machine\System\CurrentControlSet\Control\SecurityProviders \SCHANNEL\Protocols\
对于它的价值,我还通过 Regedit 检查了子项,但在HKey_Local_Machine\System\CurrentControlSet\Control\SecurityProviders \SCHANNEL\Protocols\
中找不到子项
I am completely at a loss what it could be我完全不知所措
Edit: Tried it on another PC, on which it seems to work properly编辑:在另一台 PC 上尝试过,它似乎可以正常工作
According to the binding configuration from the report, there is no https binding in your project.根据报告中的绑定配置,您的项目中没有 https 绑定。
BINDING: http *:8080:localhost绑定:http *:8080:localhost
Please ensure you checked the option of configuring HTTPS binding while creating the AspDotNET CoreAPI project.请确保您在创建 AspDotNET CoreAPI 项目时选中了配置 HTTPS 绑定的选项。
This will add additional code snippets to Startup.cs
file.这将向Startup.cs
文件添加额外的代码片段。
//Adding middlewares for redirecting HTTP request to HTTPS
app.UseHttpsRedirection();
And additional HTTPS binding configuration in launchSettings.json
file.以及launchSettings.json
文件中的附加 HTTPS 绑定配置。
Besides, most of the browsers start to support TLS1.2 only, please ensure that TLS1.2 is not disabled.此外,大部分浏览器开始只支持 TLS1.2,请确保没有禁用 TLS1.2。
Feel free to let me know if the problem still exists.如果问题仍然存在,请随时告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.