【问题标题】:Why does FedEx Rate API fails with SSL/TLS error?为什么 FedEx Rate API 会因 SSL/TLS 错误而失败?
【发布时间】:2021-11-11 11:02:26
【问题描述】:

我们使用 FedEx Rate Request API 的 web 应用最近停止工作。

现在我从这里下载了最新的 FedEx Rate API C# 示例项目: https://www.fedex.com/us/developer/downloads/sample/2021/standard/RateService_v31_cs.zip

它显示相同的错误: “请求中止:无法创建 ssl/tls 安全通道。”

谁能帮忙,问题/解决方案是什么?

提前致谢!

附言 这是我下载示例项目的页面: https://www.fedex.com/en-us/developer/web-services/process.html#StandardServices

【问题讨论】:

  • 这可能是因为他们更新为使用 Tls1.2,尝试在您的应用中使用它:System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
  • 您运行的是哪个版本的 .Net,以及哪个版本的 Windows?
  • @MarkPM:谢谢,它解决了我的问题。事实证明,这一行在我的代码中,但在一个旧的部分,它没有在最终的代码中使用。我将这一行放在请求之前,现在它可以工作了。

标签: c# ssl fedex


【解决方案1】:

@MarkPM 的解决方案:

“可能是因为他们更新为使用 Tls1.2,请尝试在您的应用中使用它:System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12

【讨论】:

    猜你喜欢
    • 2016-06-25
    • 1970-01-01
    • 2015-07-02
    • 1970-01-01
    • 2013-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多