宝塔安装的环境,.net core3.1调用三方api
提示The SSL connection could not be established, see inner exception.
即使是用IP发布的接口应用,也会这样
我的场景是.netcore api使用了SSL证书的情况下访问微信登录接口:
https://api.weixin.qq.com/sns/jscode2session
提示 远程证书无效
The SSL connection could not be established, see inner exception. The remote certificate is invalid according to the validation procedure.
解决方法:
/etc/pki/tls/cert.pem 复制到 /usr/local/openssl/
cp /etc/pki/tls/cert.pem /usr/local/openssl/
成功解决