gpt4 book ai didi

c# - 使用无效的 SSL 证书从 WSDL 生成服务代理时出现问题

转载 作者:行者123 更新时间:2023-11-30 18:06:56 25 4
gpt4 key购买 nike

我正在尝试编写一个访问网络服务的小型应用程序,但该网络服务的 SSL 证书无效。我无法控制这个事实,因为它由第三方管理。

我已经尝试通过 IE(作为管理员和我自己的用户)访问该站点并安装证书,但它似乎并没有做太多,因为下次我浏览它时我会遇到同样的错误。

当我运行 svcutil 时,我得到以下输出:

C:\Personal>svcutil.exe https://b2b:9443/LiveFeed.svc?wsdl
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152]
Copyright (c) Microsoft Corporation. All rights reserved.

Attempting to download metadata from 'https://b2b:9443/LiveFeed.svc?wsdl' using
WS-Metadata Exchange or DISCO.
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152]
Copyright (c) Microsoft Corporation. All rights reserved.

Error: Cannot obtain Metadata from https://b2b:9443/LiveFeed.svc?wsdl

If this is a Windows (R) Communication Foundation service to which you have acce
ss, please check that you have enabled metadata publishing at the specified addr
ess. For help enabling metadata publishing, please refer to the MSDN documentat
ion at http://go.microsoft.com/fwlink/?LinkId=65455.


WS-Metadata Exchange Error
URI: https://b2b:9443/LiveFeed.svc?wsdl

Metadata contains a reference that cannot be resolved: 'https://b2b:9443/Liv
eFeed.svc?wsdl'.

Could not establish trust relationship for the SSL/TLS secure channel with a
uthority 'b2b:9443'.

The underlying connection was closed: Could not establish trust relationship
for the SSL/TLS secure channel.

The remote certificate is invalid according to the validation procedure.


HTTP GET Error
URI: https://b2b:9443/LiveFeed.svc?wsdl

There was an error downloading 'https://b2b:9443/LiveFeed.svc?wsdl'.

The underlying connection was closed: Could not establish trust relationship
for the SSL/TLS secure channel.

The remote certificate is invalid according to the validation procedure.

If you would like more help, type "svcutil /?"

我知道问题与证书无效有关,但我似乎无法使证书可信。我该怎么做呢?

到目前为止我所做的是点击错误,查看证书,然后安装它。我已经在 Windows 选择它自己的证书存储区以及个人和受信任的存储区中尝试过此操作,这些都没有什么不同。

即使我设法解决了这个问题,我还是担心在我的客户 PC 上安装应用程序时会遇到问题,因为我们位于两个不同的国家/地区。

如有任何帮助,我们将不胜感激。

最佳答案

它可能就像为证书安装根 CA 证书一样简单。

关于c# - 使用无效的 SSL 证书从 WSDL 生成服务代理时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4354825/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com