title: How to configure a single WCF Service to have multiple HTTP and HTTPS endpoints?
body: <p>What I am trying to do is get a SINGLE WCF Service to work in the development environment which is the HTTP scheme, and, also, have the SAME service work in the production environment which is the HTTPS scheme. If I remove the two Https endpoints (those suffixed 'Https'), it works in the development enviornment; likewise, if I remove only the two Http endpoints then it works in the production environment. I would like to have all four endpoints in the web.config, if possible.</p>
  
  <p>My endpoints are defined below:</p>
  
  <pre><code>&lt;endpoint address="/Web" 
          behaviorConfiguration="AjaxBehavior"
          binding="wsHttpBinding" 
          bindingConfiguration="web" 
          name="Web"
          contract="Service" /&gt;
  &lt;endpoint address="/Custom"
          binding="customBinding" 
          bindingConfiguration="custom" 
          name="Custom"   
          contract="Service" /&gt;
  &lt;endpoint 
          address="/WebHttps" 
          behaviorConfiguration="AjaxBehavior"
          binding="wsHttpBinding" 
          bindingConfiguration="webHttps" 
          name="WebHttps"
          contract="Service" /&gt;
  &lt;endpoint address="/CustomHttps"
          binding="customBinding" 
          bindingConfiguration="customHttps" 
          name="CustomHttps" 
          contract="Service" /&gt;
  </code></pre>
  
  <p><strong>Edited:</strong> I am editing my question to add the error I am getting, and the binding sections (below). Sorry for the new length of the question.</p>
  
  <p>The error is:
  "Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [https]."</p>
  
  <p>Additionally, the production site is set up to "Require SSL". That can not change.</p>
  
  <p>The bindings configurations are:</p>
  
  <pre><code>&lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="ServiceBehavior"&gt;
        &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"  /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
    &lt;endpointBehaviors&gt;
      &lt;behavior name="AjaxBehavior"&gt;
        &lt;enableWebScript/&gt;
      &lt;/behavior&gt;
    &lt;/endpointBehaviors&gt;
  &lt;/behaviors&gt;
  
  &lt;bindings&gt;
    &lt;customBinding&gt;
      &lt;binding name="custom"&gt;
        &lt;textMessageEncoding&gt;
          &lt;readerQuotas maxDepth="7000000" maxStringContentLength="7000000"
              maxArrayLength="7000000" maxBytesPerRead="7000000"
              maxNameTableCharCount="7000000" /&gt;
        &lt;/textMessageEncoding&gt;
  
        &lt;httpTransport maxBufferPoolSize="7000000" maxReceivedMessageSize="7000000"
            maxBufferSize="7000000" /&gt;
      &lt;/binding&gt;
      &lt;binding name="customHttps"&gt;
        &lt;textMessageEncoding&gt;
          &lt;readerQuotas maxDepth="7000000" maxStringContentLength="7000000"
              maxArrayLength="7000000" maxBytesPerRead="7000000"
                    maxNameTableCharCount="7000000" /&gt;
        &lt;/textMessageEncoding&gt;
  
        &lt;httpsTransport maxBufferPoolSize="7000000" maxReceivedMessageSize="7000000"
            maxBufferSize="7000000" /&gt;
  
      &lt;/binding&gt;
    &lt;/customBinding&gt;
  
    &lt;webHttpBinding&gt;
      &lt;binding name="web"  maxBufferPoolSize="70000000"
          maxReceivedMessageSize="70000000"&gt;
        &lt;readerQuotas maxDepth="70000000" maxStringContentLength="70000000"
            maxArrayLength="70000000" maxBytesPerRead="70000000"
            maxNameTableCharCount="70000000" /&gt;
        &lt;security mode="None" /&gt;
      &lt;/binding&gt;
  
      &lt;binding name="webHttps" maxBufferPoolSize="70000000"
          maxReceivedMessageSize="70000000"&gt;
  
        &lt;readerQuotas maxDepth="70000000" maxStringContentLength="70000000"
                  maxArrayLength="70000000" maxBytesPerRead="70000000"
                  maxNameTableCharCount="70000000" /&gt;
  
        &lt;security mode="Transport" /&gt;
      &lt;/binding&gt;
    &lt;/webHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;
  </code></pre>
  
  <p>Any ideas?</p>