有没有办法强制 svcutil.exe 忽略 SSL 证书问题?

发布于 2024-07-30 09:55:30 字数 105 浏览 2 评论 0原文

我需要 svcutil.exe 为我生成代理类,但问题是 Web 服务只能通过 HTTPS 访问,并且 SSL 证书是自签名的。

如何强制 svcutil.exe 忽略此问题?

I need svcutil.exe to generate a proxy class for me, but the problem is that the web service can be accessed only via HTTPS and the SSL certificate is self signed.

How can I force svcutil.exe to ignore this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

月朦胧 2024-08-06 09:55:30

似乎有效的一件事是启动 Fiddler 并让它在您发出 SVCUTIL 请求时运行。 Fiddler 的证书有效并且似乎工作正常。

One thing that seemed to work was to fire up Fiddler and have it running as you make the SVCUTIL requests. Fiddler's cert is valid and seems to work fine.

乖乖公主 2024-08-06 09:55:30

+1 使用小提琴手。 您只需转到“工具”>“ Fiddler 选项并选中解密 HTTPS。

+1 for using fiddler. You just need to go to the TOOLS > Fiddler Options and check Decrypt HTTPS.

泛滥成性 2024-08-06 09:55:30

您可以尝试先浏览到 https 站点,忽略证书不受信任的警告,然后单击证书并安装它。

这应该会导致您正在使用的计算机信任该证书。

然后尝试再次运行 svcutil。

You could try browsing to the https site first, ignore the warning that the certificate is not trusted, then click on the certificate and install it.

This should result in the machine you are working on trusting the certificate.

Then try running svcutil again.

舂唻埖巳落 2024-08-06 09:55:30

浏览到https站点,忽略警告,保存wsdl,并直接从wsdl生成客户端类

Browse to the https site, ignore the warning, save the wsdl, and generate the client class directly from the wsdl

你是暖光i 2024-08-06 09:55:30

您可以使用带有 --insecure 标志的curl 在本地下载 wsdl,然后从中生成类。

curl --insecure "https://url_to_the_wsdl" >download.wsdl
svcutil.exe download.wsdl

请随意修改文件名,根据需要添加开关。

You can use curl with the --insecure flag to download the wsdl locally, then generate the classes from that.

curl --insecure "https://url_to_the_wsdl" >download.wsdl
svcutil.exe download.wsdl

Feel free to modify file names as appropriate, adding switches as required.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文