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

痞子三分冷 提交于 2020-02-01 12:22:37

问题


I have use below below configuration without "https". Now url changed to "https". But I am getting "The provided URI scheme 'https' is invalid; expected 'http'.Parameter name: via" error while calling it.

<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>

How to fix the error?


回答1:


What do you get when you change your security tag's mode to Transport?

<security mode="Transport">

We use https services and this is the mode we use -- we use None for http in our development environments.



来源:https://stackoverflow.com/questions/9010637/the-provided-uri-scheme-https-is-invalid-expected-http-parameter-name-via

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!