title: WCF Services need to be HTTPS only but only work on HTTP
body: <p>I have some WCF services that have been working for a while now on HTTP.</p>
  
  <p>I'm moving them to deployment server now and they need to be HTTPS only.</p>
  
  <p>I got the certificate and when I initially set the up they worked over both HTTP and HTTPS.</p>
  
  <p>...at this point I wanted to drop the non-secure access to the services.</p>
  
  <p>So I'm trying to make amendments to my web.config to make this happen:</p>
  
  <p><strong>Service Behaviours:</strong></p>
  
  <pre><code>  &lt;serviceBehaviors&gt;
      &lt;behavior name="MetaEnabledBahavior"&gt;
        &lt;serviceMetadata httpsGetEnabled="true"/&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  </code></pre>
  
  <p><strong>Service Endpoints:</strong></p>
  
  <pre><code>  &lt;service name="Services.BookingService" behaviorConfiguration="MetaEnabledBahavior"&gt;
      &lt;!-- Service Endpoints --&gt;
      &lt;clear/&gt;
      &lt;endpoint address="https://website.com/services/BookingService.svc" binding="wsHttpBinding"
         bindingConfiguration="TransportSecurity" contract="Services.IBookingService"/&gt;
      &lt;endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/&gt;
    &lt;/service&gt;
  </code></pre>
  
  <p><strong>Bindings:</strong></p>
  
  <pre><code>&lt;bindings&gt;
    &lt;wsHttpBinding&gt;
      &lt;binding name="TransportSecurity" maxReceivedMessageSize="2000000"&gt;
        &lt;security mode="Transport"&gt;
          &lt;transport clientCredentialType="None"/&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/wsHttpBinding&gt;
  &lt;/bindings&gt;
  </code></pre>
  
  <p>What I have ended up with at the moment is my HTTP services are still accessible, but the HTTPS access just sends a blank page.</p>
  
  <p>I need HTTP to return an error/page must be viewed by secure channel and HTTPS to be the ones that work only.</p>
  
  <p>How do I fix this?</p>