首页 > 解决方案 > Web 代理:无法为 SSL/TLS 安全通道建立信任关系

问题描述

我正在尝试从我开发的本地 Web 服务向第三方 Web 服务发出传出 HTTP 调用。问题是我通常连接到 VPN,因为这是一个公司环境,如果我连接到 VPN,我会收到错误消息。如果我断开 VPN,HTTP 调用就会顺利通过。

我已将此添加到我的网络服务的 web.config 中:

<configuration>
 <system.net>
  <defaultProxy>
   <proxy bypassonlocal="false" usesystemdefault="true" />
  </defaultProxy>
 </system.net>
</configuration>

仍然无法正常工作...我还需要哪些额外步骤?

标签: xmlweb-servicesproxy

解决方案


我已通过将其添加到 web.config 来解决此问题:

  <system.net>
    <defaultProxy>
      <proxy autoDetect="false" bypassonlocal="true" proxyaddress="http://<proxy>:<port>/" />
    </defaultProxy>
  </system.net>

我从 Internet 选项中找到了我的组织的代理 URI,在连接选项卡下,选择 VPN 连接。


推荐阅读