提供的URI方案“https”无效;预期'http'。参数名称:via

时间:2012-01-25 21:33:48

标签: asp.net wcf web-services

我使用下面的配置而没有“https”。现在网址已更改为“https”。但我得到“提供的URI方案'https'无效;预期'http'.Parameter名称:通过”错误调用它。

<system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="ERightsPortBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>          
    </binding>
  </basicHttpBinding>
</bindings>
<client>
  <endpoint address="https://dev.company.com/jws/ws/EService?WSDL" binding="basicHttpBinding" bindingConfiguration="ERightsPortBinding" contract="ERights.ERights" name="ERightsPort" />
</client>

如何解决错误?

1 个答案:

答案 0 :(得分:26)

security代码的模式更改为Transport后,您会得到什么?

<security mode="Transport">

我们使用https服务,这是我们使用的模式 - 我们在开发环境中使用None作为http。