The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.

dotnet core在Linux(如:centOS)环境下使用HttpClient请求https可能会报异常:

One or more errors occurred. (The SSL connection could not be established, see inner exception.) 

设置如下环境变量暂时解决:

export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0

 

 

 

如果服务器在国外,C#代码访问国内的网站,还有可能是被墙。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2021-12-13
  • 2022-12-23
  • 2021-10-04
  • 2021-10-09
  • 2021-10-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2021-10-17
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
相关资源
相似解决方案