我正在运行 Windows 7 64 位专业版并尝试编写 RSS Feed 阅读器
这是错误消息 - $exception {“请求已中止:无法创建 SSL/TLS 安全通道。”} System.Net.WebException
我被告知此错误不会发生在 Windows 10 计算机上。
知道如何在 Windows 7 上修复此问题吗?
我正在使用 Visual Studio 2019 这是带有 Visual Basic 的 ASP.Net。
由于 TLS 设置,Windows 7 上会出现此错误。根据解决 TLS 1.0 问题,第二版 https://learn.microsoft.com/en-us/security/engineering/solving-tls1-problem, TLS 1.2 默认处于禁用状态。因此,需要启用它。确保您已安装 SP 1。然后,
创建还原点
- Open 控制面板
- 选择查看方式:小图标
- Click System
- 在左侧,单击系统保护
- 如果没有开启保护
C:
,然后单击配置打开它。选择所需尺寸并单击OK.
- Click Create创建还原点
- 输入所需的还原点名称
- Click Create
Go to
更新以在 Windows 中的 WinHTTP 中启用 TLS 1.1 和 TLS 1.2 作为默认安全协议 https://support.microsoft.com/en-us/topic/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-winhttp-in-windows-c4bd73d2-31d7-761e-0178-11268bb10392并点击Easy Fix https://support.microsoft.com/en-us/topic/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-winhttp-in-windows-c4bd73d2-31d7-761e-0178-11268bb10392#bkmk_easy
将下面的代码/文本复制到以 .reg 结尾的文件中(例如:TLSFix.reg)。
- 打开您最喜欢的文本编辑器(在:记事本中)
- 复制下面的代码/文本
- 使用“.reg”扩展名保存文件(例如:TLSFix.reg)。或者,使用“.txt”扩展名保存。然后右键单击该文件并将其重命名,使其具有“.reg”扩展名。
赢7(64位):
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"SecureProtocols"=dword:00000aa8
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp]
"DefaultSecureProtocols"=dword:00000a00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp]
"DefaultSecureProtocols"=dword:00000a00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"Enabled"=dword:00000001
"DisabledByDefault"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"Enabled"=dword:00000001
"DisabledByDefault"=dword:00000000
然后双击该文件将条目添加到注册表中。或者,使用 regedit 将每个注册表项添加到注册表中。
Note:上面的注册表项在中讨论更新以在 Windows 中的 WinHTTP 中启用 TLS 1.1 和 TLS 1.2 作为默认安全协议 https://support.microsoft.com/en-us/topic/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-winhttp-in-windows-c4bd73d2-31d7-761e-0178-11268bb10392 and 传输层安全 (TLS) 注册表设置 https://learn.microsoft.com/en-us/windows-server/security/tls/tls-registry-settings.
资源:
- 解决 TLS 1.0 问题,第二版 https://learn.microsoft.com/en-us/security/engineering/solving-tls1-problem
- Windows 和支持的 TLS 版本 https://sockettools.com/kb/windows-and-supported-tls-versions/
- 更新以在 Windows 中的 WinHTTP 中启用 TLS 1.1 和 TLS 1.2 作为默认安全协议 https://support.microsoft.com/en-us/topic/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-winhttp-in-windows-c4bd73d2-31d7-761e-0178-11268bb10392
- 传输层安全 (TLS) 注册表设置 https://learn.microsoft.com/en-us/windows-server/security/tls/tls-registry-settings
- .NET Framework 的传输层安全 (TLS) 最佳实践 https://learn.microsoft.com/en-us/dotnet/framework/network-programming/tls
- TLS/SSL 工具和设置 https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc776467(v=ws.10)?redirectedfrom=MSDN
- CA5386:避免硬编码 SecurityProtocolType 值 https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5386
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)