【问题标题】:Client Certificates and Visual Studio WSDL客户端证书和 Visual Studio WSDL
【发布时间】:2015-04-01 01:19:15
【问题描述】:

我遇到了一个相当不寻常的问题,我无法在 Visual Studio 2013 中使用 wsdl。

为了在 IE/Chrome/Safari 中查看 url,我需要安装 .p12 和 .crt 安全证书。

我已将 IE 设置为不提示,但在 Safari 中我看到以下提示: 我猜visual studio也想确认证书但无法提示。

尝试在 Visual Studio 2013 中添加服务引用时,我看到以下错误:

"An error occured (details) while attempting to find services at..."

详情如下:

There was an error downloading 'https://xxx/xxx.svc/$metadata'.
The request was aborted: Could not create SSL/TLS secure channel.
Metadata contains a reference that cannot be resolved: 'https://xxx.wsdl'.
Could not establish secure channel for SSL/TLS with authority 'xxx.com'.
The request was aborted: Could not create SSL/TLS secure channel.
If the service is defined in the current solution, try building the solution and adding the service reference again.

有解决办法吗?

【问题讨论】:

    标签: visual-studio visual-studio-2013 wsdl ssl-certificate


    【解决方案1】:

    正如 Prashant 所说,第一步是下载 WSDL 文件。这就像浏览器中的“文件 > 另存为”一样简单。

    下一步是检查下载的 WSDL 并查看 xml 中是否有任何“xs:import”引用。按照每个参考并将文件下载到与 WSDL 相同的路径。

    我发现 WSDL 引用了 2x .xsd 文件和文件,然后引用了其他 .xsd 文件。我最终得到了总共 6 个文件。

    对于所有文件(wsdl 和 xsd),必须检查“xs:import”以确保 schemaLocation 指向本地文件路径。

    最后,如果您添加服务引用作为细读并输入 WSDL 文件的本地路径。

    很抱歉回答我自己的问题,但我想为团队的其他成员以及可能遇到困难的任何人记录这一点。

    【讨论】:

      【解决方案2】:

      您应该获取 .wsdl 文件,然后使用 wsdl.exe 从中生成代理。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-10-16
        • 2010-11-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-06-01
        相关资源
        最近更新 更多