所提供的URI方案的“https”是无效的;预计“HTTP”。参数名:通过 [英] The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via

查看:3534
本文介绍了所提供的URI方案的“https”是无效的;预计“HTTP”。参数名:通过的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做一个WCF服务到使用basicHttpBinding的通过HTTPS。这里是我的web.config:

I am trying to make a WCF service over basicHttpBinding to be used over https. Here's my web.config:

  <service behaviorConfiguration="MyServices.PingResultServiceBehavior"
   name="MyServices.PingResultService">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="defaultBasicHttpBinding"
     contract="MyServices.IPingResultService">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>

...

<bindings>
  <basicHttpBinding>
    <binding name="defaultBasicHttpBinding">
      <security mode="Transport">
        <transport clientCredentialType="None"/>
      </security>
    </binding>
  </basicHttpBinding>
</bindings>

...
    
      
        
          
          
        
      
    

...

我使用WCFStorm这是能够正确地检索所有元数据连接,但是当我打电话的实际方法获得:

I am connecting using WCFStorm which is able to retrieve all the meta data properly, but when I call the actual method I get:

所提供的URI方案的https是无效的;预计HTTP。
参数名称:通过

The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via

推荐答案

尝试在您的app.config添加信息的凭据,如:

Try adding message credentials on your app.config like:

<bindings> 
<basicHttpBinding> 
<binding name="defaultBasicHttpBinding"> 
  <security mode="Transport"> 
    <transport clientCredentialType="None" proxyCredentialType="None" realm=""/> 
    <message clientCredentialType="Certificate" algorithmSuite="Default" />
  </security> 
</binding> 
</basicHttpBinding> 
</bindings> 

这篇关于所提供的URI方案的“https”是无效的;预计“HTTP”。参数名:通过的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆