• Invoke-WebRequest : 请求被中止: 未能创建 SSL/TLS 安全通道。


    运行invoke-webrequest报错:

      

      根据你的 PowerShell、.NET Framework 的版本和升级,WEB 连接的缺省安全协议可能仍然是 SSL3。

    您可以方便地查明它:

      

    [Net.ServicePointManager]::SecurityProtocol

      返回的协议不包含 Tls12,那么可能无法用 PowerShell 连接到安全的 Web Service 和网站。

    我们只需要这样操作就可以启用更多的服务:

      

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Ssl3 -bor [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12
    [Net.ServicePointManager]::SecurityProtocol

    至此问题已经完全解决

      

  • 相关阅读:
    preprocessing
    hist
    RabbitMQ
    线程池
    springmvc功能以及源码实现分析
    西瓜书第二章--模型评估与选择
    西瓜书第一章--绪论
    基于python的递归简述
    python小白学习之旅5
    python小白学习之旅4
  • 原文地址:https://www.cnblogs.com/feiyucha/p/11073931.html
Copyright © 2020-2023  润新知