starxiaoyu 7/28/2021, 12:47:52 AM
.net 版本为4.8
在win10下载时没问题,换到win7就会出现错误:
  1. The underlying connection was closed: An unexpected error occurred on a send
复制代码
已经在下载前要求了使用tls1.2
  1. ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
复制代码
win7下只有部分服务器的文件可以被下载,例如:OneDrive就不行,会报错
win10下则完全没问题

呆瓜Domado 7/28/2021, 2:45:37 AM
  1. System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
复制代码

添加这个代码,使系统兼容所有TLS版本

starxiaoyu 7/28/2021, 7:01:57 AM
呆瓜Domado 发表于 2021-7-28 10:45
添加这个代码,使系统兼容所有TLS版本

刚试了下 也还是一样报错 win10就没事

嵿尖丶战神 7/28/2021, 4:29:57 PM

第一页 上一页 下一页 最后一页