title: The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via
body: <p>I thought Id create a new question as my <a href="https://stackoverflow.com/questions/15582721/the-server-was-unable-to-process-the-request-due-to-an-internal-error-wcf-ser">earlier question</a> was full of noise. Anyways I worked my way through the suggestions there and now I'm getting the following error when I try to access the client.</p>
  
  <p>Stack Trace:</p>
  
  <pre><code>[ArgumentException: The provided URI scheme 'http' is invalid; expected 'https'.
  Parameter name: via]
     System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) +12692384
     System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) +24
     System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) +276
     System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) +29
     System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) +71
     System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) +52
     System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) +55
     System.ServiceModel.Channels.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) +35
     System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) +23
     System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) +71
     System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) +468
     System.ServiceModel.ChannelFactory`1.CreateChannel() +29
     System.ServiceModel.ClientBase`1.CreateChannel() +95
     System.ServiceModel.ClientBase`1.CreateChannelInternal() +23
     System.ServiceModel.ClientBase`1.get_Channel() +281
     _Default.btSubmit_click(Object sender, EventArgs e) +73
     System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9553178
     System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
     System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
     System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
     System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
  </code></pre>
  
  <p>Here is web.config(for the client application):</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;connectionStrings&gt;
          &lt;add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/&gt;
      &lt;/connectionStrings&gt;
      &lt;system.web&gt;
          &lt;compilation debug="false" targetFramework="4.0"&gt;
              &lt;assemblies&gt;
                  &lt;add assembly="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;&lt;/assemblies&gt;&lt;/compilation&gt;
          &lt;authentication mode="Forms"&gt;
              &lt;forms loginUrl="~/Account/Login.aspx" timeout="2880"/&gt;
          &lt;/authentication&gt;
          &lt;membership&gt;
              &lt;providers&gt;
                  &lt;clear/&gt;
                  &lt;add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/&gt;
              &lt;/providers&gt;
          &lt;/membership&gt;
          &lt;profile&gt;
              &lt;providers&gt;
                  &lt;clear/&gt;
                  &lt;add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/&gt;
              &lt;/providers&gt;
          &lt;/profile&gt;
          &lt;roleManager enabled="false"&gt;
              &lt;providers&gt;
                  &lt;clear/&gt;
                  &lt;add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/&gt;
                  &lt;add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/&gt;
              &lt;/providers&gt;
          &lt;/roleManager&gt;
      &lt;/system.web&gt;
      &lt;system.webServer&gt;
          &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
      &lt;/system.webServer&gt;
      &lt;system.serviceModel&gt;
          &lt;bindings&gt;
              &lt;basicHttpBinding&gt;
          &lt;binding name="BasicHttpBinding_IService"&gt;
            &lt;security mode="Transport"&gt;
              &lt;transport clientCredentialType="None" proxyCredentialType="None" realm="" /&gt;
              &lt;message clientCredentialType="Certificate" algorithmSuite="Default" /&gt;
  
             &lt;/security&gt;
          &lt;/binding&gt;
              &lt;/basicHttpBinding&gt;
          &lt;/bindings&gt;
          &lt;client&gt;
              &lt;endpoint address="http://10.0.2.141/Services/SunSetSunRiseService/Service.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService" contract="ServiceReference1.IService" name="BasicHttpBinding_IService"/&gt;
          &lt;/client&gt;
      &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I've tried implementing the advice in related questions, But have found no help yet .</p>