.NET 6控制台应用Windows任务计划触发TLS HandshakeFailure问题排查
.NET 6控制台应用调用第三方API出现HandshakeFailure错误
我有一个.NET 6控制台应用,通过Windows任务计划程序触发时,调用第三方供应商API会出现HandshakeFailure错误,但用Postman执行该API却能成功获取响应。
不同场景下的Cipher Suites
Windows任务计划执行API时的Cipher Suites:

Postman调用API时的Cipher Suites:

已尝试的解决方案(未生效)
添加了以下代码,但问题依旧:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;
内容的提问来源于stack exchange,提问作者Jason
相关产品推荐
相关产品推荐

