13

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?

James123
  • 11,184
  • 66
  • 189
  • 343
  • I used http://stackoverflow.com/questions/2435823/the-provided-uri-scheme-https-is-invalid-expected-http-parameter-name-via to fix this recently. – PMC Jan 25 '12 at 21:36

1 Answers1

26

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.

David Hoerster
  • 28,421
  • 8
  • 67
  • 102
  • This works for me but when I called eRights.isMember(userName); it says ... "Cannot find dispatch method for {http://ws.security.company.com/}isMember" – James123 Jan 25 '12 at 22:07
  • Sounds like you may be having another issue (which would mean another question). You could post your contract and implementation (abbreviated versions) to see if anyone can see an issue with your service contract. But this seems unrelated to your original problem. – David Hoerster Jan 25 '12 at 22:34
  • Looks like you already asked another question about this. If this answered your question, you should mark it as so. :) – David Hoerster Jan 25 '12 at 22:41
  • Thanks David, this worked.. can you please explain WHY this would fix it? Still confused by what this error message meant in the first place. – ewitkows Sep 14 '12 at 20:42