在VS2019中添加或消费新的WCF Web服务参考时,无法创建SSL/TLS安全频道 -

发布于 2025-02-13 06:13:05 字数 610 浏览 0 评论 0原文

在执行此操作时,我需要在VS2019上的.NET Core 5.0项目中添加WCF服务参考。我会收到以下错误:

尝试通过'https://ws-xxxxxx/xxxrtnerConnection?wsdl'寻找服务时发生了错误。该请求被中止:无法创建SSL/TLS安全频道。

我还尝试了以下解决此问题的方法,但没有运气:

  1. 在本地机器中安装了SSL证书。
  2. 然后,我可以在浏览器中访问该服务。
  3. 我将该服务保存/下载到机器中,之后能够使用从VS2019中添加服务参考
  4. 尝试访问包含的方法内部服务时,请在以下错误:

无法建立使用权威“ WS-xxxxxx/xxxrtnerConnection”的SSL/TLS安全频道的信任关系。

但是,令人惊讶的是,当我在MVC项目中消费服务时,一切正常,它在web.config文件中添加了sustombinding xml代码,并且.NET Core Project中没有此类文件。

因此,我应该在.NET Core Project中消费服务。

I need to add WCF service reference in .NET core 5.0 project on VS2019 When doing this I am getting the below error:

An error occurred while attempting to find services at 'https://ws-xxxxxx/xxxrtnerConnection?wsdl'. The request was aborted: Could not create SSL/TLS secure channel.

I have also tried below ways for solving this issue but no luck:

  1. Installed SSL certificate in in my local machine.
  2. Then I can access the service in browser.
  3. I saved/download that service in machine after that able to consume saved service using Add service reference from vs2019.
  4. When trying to access contained method inside service then getting below error:

Could not establish trust relationship for the SSL/TLS secure channel with authority 'ws-xxxxxx/xxxrtnerConnection'.

But the amazing thing is that everything is working fine when I am consuming service in MVC project after consuming it adds customBinding xml code in web.config file and there is no such file in .Net core project.

So what should I do for consuming service in .NET core project.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文