简体   繁体   English

调用https Web服务(C#)

[英]Calling a https web service (C#)

I implemented a web service which is available under some https url. 我实现了一个Web服务,该服务在某些https网址下提供。 The client (a console app) calls it, but the following error is thrown: 客户端(控制台应用程序)调用它,但抛出以下错误:

The provided URI scheme 'https' is invalid; 提供的URI方案“https”无效; expected 'http'. 预计'http'。

I searched that in the net, but I am not really sure how to solve it? 我在网上搜索过,但我不确定如何解决它? Is this solved by adding some code to the web service? 这是通过向Web服务添加一些代码来解决的吗?

Thanks :-) 谢谢 :-)

You have <security mode="Transport"> on the binding. 您在绑定上有<security mode="Transport"> This means it uses https. 这意味着它使用https。 Change the <endpoint address=...> to agree, or change to a non-transport-security http binding. <endpoint address=...>更改为同意,或更改为非传输安全性http绑定。

Was this svcutil-generated (Add Web Referenc) config? 这是svcutil生成的(Add Web Referenc)配置吗? What does the server config look like? 服务器配置是什么样的? It is surprising to generate 'inconsistent' config like this from the metadata. 从元数据中生成这样的“不一致”配置是令人惊讶的。

Regards 问候

Karan Shah 卡兰沙阿

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM