title: The provided URI scheme 'https' is invalid; expected 'http'. Parameter name--Immediate Help Needed
body: <p>Hello I tried all the solutions provided in stack over flow. I am getting   "The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via" error. Service is rumnning fine in IIS7 and i am getting this error when ever i try to consume this service.Please see my wcf service configuration and client configuration.</p>
  
  <pre><code>  &lt;?xml version="1.0"?&gt;
      &lt;configuration&gt;
      &lt;system.web&gt;
      &lt;compilation targetFramework="4.0"/&gt;
      &lt;httpRuntime/&gt;
      &lt;/system.web&gt;
      &lt;system.serviceModel&gt;
      &lt;serviceHostingEnvironment &gt;
      &lt;serviceActivations&gt;
      &lt;add factory="System.ServiceModel.Activation.ServiceHostFactory"         relativeAddress="./CARetriever.svc" service="CARetrieverInterface.CARetriever"/&gt;
        &lt;/serviceActivations&gt;
      &lt;/serviceHostingEnvironment&gt;
  
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="MyTesting"&gt;
            &lt;!-- Other options would go here --&gt;
            &lt;useRequestHeadersForMetadataAddress&gt;
              &lt;defaultPorts&gt;
                &lt;add scheme="https" port="443" /&gt;
              &lt;/defaultPorts&gt;
            &lt;/useRequestHeadersForMetadataAddress&gt;
            &lt;serviceMetadata httpsGetEnabled="True"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
  
      &lt;services&gt;
        &lt;service name="CARetrieverInterface.CARetriever" behaviorConfiguration="MyTesting"&gt;
          &lt;endpoint address="https://sspumptest.dhr.state.ga.us/testcode/CARetriever.svc" binding="basicHttpBinding" contract="CARetrieverInterface.ICARetriever" bindingConfiguration="secureHttpBinding"&gt;
            &lt;identity&gt;
              &lt;dns value="sspumptest.dhr.state.ga.us" /&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;!--&lt;endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /&gt;--&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
          &lt;binding name="secureHttpBinding"&gt;
            &lt;security mode="Transport"&gt;
              &lt;transport clientCredentialType="None" proxyCredentialType="None" realm=""/&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
        &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  
  My client configuration is given below.
  
  &lt;?xml version="1.0"?&gt;
  
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0" /&gt;
    &lt;/system.web&gt;
  
    &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
          &lt;binding name="BasicHttpBinding_ICARetriever"&gt;             
          &lt;/binding&gt;
        &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
        &lt;endpoint address="https://sspumptest.dhr.state.ga.us/testcode/CARetriever.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICARetriever"
            contract="CARetrieverRef.ICARetriever" name="BasicHttpBinding_ICARetriever" /&gt;
      &lt;/client&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>