The request with exception: The SSL connection could not be established, see inner exception. requestId 解决方案

DOTNET CORE 部署 Centos7 抛出异常

CentOS7 版本:

CentOS 7.6 64位

DONET RUNTIME 版本:

Microsoft.AspNetCore.All 2.2.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

异常类型:

The request with exception: The SSL connection could not be established, see inner exception. requestId

OR

The remote certificate is invalid according to the validation procedure.

解决方案:

By defining the System.Net.Http.UseSocketsHttpHandler switch in the .netcore.runtimeconfig.json configuration file:

 
"runtimeOptions": {
  "configProperties": {
      "System.Net.Http.UseSocketsHttpHandler": false
  }
}

猜你喜欢

转载自www.cnblogs.com/CnKker/p/11423471.html
今日推荐