title: Web Service Error "The provided URI scheme 'http' is invalid; expected 'https'."
body: <p>I have a service call which is causing the following error: "The provided URI scheme 'http' is invalid; expected 'https'."</p>
  
  <p>app.config values:</p>
  
  <pre><code>&lt;basicHttpBinding&gt;
  &lt;binding name="xx_xxxxx_spcName" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                maxBufferSize="655360" maxBufferPoolSize="524288" maxReceivedMessageSize="655360"
                messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                useDefaultWebProxy="true"&gt;
            &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
            &lt;security mode="Transport"&gt;
              &lt;transport clientCredentialType="None" /&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
  &lt;/basicHttpBinding&gt;
  
  
  &lt;client&gt;
  &lt;endpoint address="http://server/serviceaddress_removed" 
                  binding="basicHttpBinding" bindingConfiguration="xx_xxxxx_spcName" 
                  contract="xx.xx_xxxxx_spcName" name="xx_xxxxx_spcName" /&gt;
  &lt;/client&gt;
  </code></pre>
  
  <p>Ive tried Https:// but everythings internal so wouldn't expect I need this, besides it also gives a client/server error.</p>
  
  <p>I've also tried changing the binding type </p>
  
  <p>I've also looked through other forum posts on here and asp.net and all seem to point at using Transport and passing in client credentials which I'm doing in my code as follows:</p>
  
  <pre><code>client.ClientCredentials.UserName.UserName = "XXXXX";
  client.ClientCredentials.UserName.Password = "XXXXX";
  </code></pre>