You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

.NET 6控制台应用Windows任务计划触发TLS HandshakeFailure问题排查

.NET 6控制台应用调用第三方API出现HandshakeFailure错误

我有一个.NET 6控制台应用,通过Windows任务计划程序触发时,调用第三方供应商API会出现HandshakeFailure错误,但用Postman执行该API却能成功获取响应。

不同场景下的Cipher Suites

  • Windows任务计划执行API时的Cipher Suites:
    Windows任务计划执行API时的Cipher Suites

  • Postman调用API时的Cipher Suites:
    Postman调用API时的Cipher Suites

已尝试的解决方案(未生效)

添加了以下代码,但问题依旧:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12
| SecurityProtocolType.Ssl3; 

内容的提问来源于stack exchange,提问作者Jason

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.04 22:22:05