提供的 uri 方案 https 无效;预期“http”在应用程序配置中
我有一个像下面这样的 url 的 wcf
https://localhost:44370/service.svc
我有一个使用上面的 wcf 的窗口服务
,在我的 app.config 中我配置了与下面相同的内容,
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpsBinding_IService" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://localhost:44370/service.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpsBinding_IService" contract="FileServer.IService"
name="BasicHttpsBinding_IService" />
</client>
</system.serviceModel>
但我收到以下错误:提供的 uri 方案 https 无效; 预期为“http”
当我将绑定类型更改为 https 时,
<system.serviceModel>
<bindings>
<basicHttpsBinding>
<binding name="BasicHttpsBinding_IService" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" />
</basicHttpsBinding>
</bindings>
<client>
<endpoint address="https://localhost:44370/service.svc" binding="basicHttpsBinding"
bindingConfiguration="BasicHttpsBinding_IService" contract="FileServer.IService"
name="BasicHttpsBinding_IService" />
</client>
</system.serviceModel>
,如下所示,然后我收到以下错误
配置绑定扩展“system.servicemodel/binding.basichttpsbinding”无法找到。验证此绑定扩展是否已在“system.servicemodel/binding.basichttpsbinding”中正确注册并且拼写正确。
我能做什么来解决这个问题?
I have a wcf with like below url
https://localhost:44370/service.svc
I have a window service which is using the above wcf
and in my app.config I configured the same like below
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpsBinding_IService" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://localhost:44370/service.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpsBinding_IService" contract="FileServer.IService"
name="BasicHttpsBinding_IService" />
</client>
</system.serviceModel>
but I am getting the following error the provided uri scheme https is invalid; expected 'http'
when I changed my binding type into https like below
<system.serviceModel>
<bindings>
<basicHttpsBinding>
<binding name="BasicHttpsBinding_IService" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" />
</basicHttpsBinding>
</bindings>
<client>
<endpoint address="https://localhost:44370/service.svc" binding="basicHttpsBinding"
bindingConfiguration="BasicHttpsBinding_IService" contract="FileServer.IService"
name="BasicHttpsBinding_IService" />
</client>
</system.serviceModel>
then I am getting the below error
configuration binding extension 'system.servicemodel/binding.basichttpsbinding' could not be found. verify that this binding extension is properly registered in 'system.servicemodel/binding.basichttpsbinding' and that it is spelled correctly.
what can I do to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在尝试将 HTTPS 地址与 HTTP 绑定一起使用,请将绑定类型更改为“basicHttpsBinding”。
You are trying to use a HTTPS address with a HTTP binding, change the binding type to 'basicHttpsBinding'.
添加安全模式,此更改将允许您使用 https 而不是 http。
You try adding security mode to the binding, this change will allow you to use https instead of http.