title: How do I configure my WCF (svc) Service on IIS to serve on HTTPS requests only?
body: <p>I have a WCF (svs) web service, that is running on a Windows 2008 IIS web server.  </p>
  
  <p>The IIS server already has a SSL certificate installed and is hosting Classic ASP, and PHP over both HTTP and HTTPS.  </p>
  
  <p>I have installed the WCF service as a application on the IIS server (on the same domain) and it can serve requests using both HTTP and HTTPS perfectly.</p>
  
  <p>However, I want this WCF service to ONLY serve HTTPS requests and responses.  </p>
  
  <p>What do I need to change within the WCF web.config to achieve this ?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Following on from my post above, I've managed to research the following which appears to work using the web.config file;</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;services&gt;
       &lt;service behaviorConfiguration="returnFaults" name="MyService.MonitorService"&gt;
        &lt;endpoint binding="wsHttpBinding" bindingConfiguration=
              "TransportSecurity" contract="MyService.IMonitorSvc" /&gt;
       &lt;/service&gt;
     &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="returnFaults"&gt;
            &lt;!-- To avoid disclosing metadata information, set the values below to false before deployment --&gt;
            &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/&gt;
            &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information --&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;bindings&gt;
          &lt;wsHttpBinding&gt;
             &lt;binding name="TransportSecurity"&gt;
                   &lt;security mode="Transport"&gt;
                    &lt;transport clientCredentialType="None"/&gt;
                    &lt;/security&gt;
              &lt;/binding&gt;
            &lt;/wsHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;protocolMapping&gt;
          &lt;add binding="basicHttpsBinding" scheme="https" /&gt;
      &lt;/protocolMapping&gt;
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Can anyone confirm that this is the correct approach for a WCF service, to enforce that all requests are made via HTTPS (SSL) ?  </p>
  
  <p>Basically using the above, would a user be able to make a HTTP request to the service or not ?  Or would the service always enforce HTTPS</p>
  
  <p>Thanks for the clarification.</p>