title: Castle Windsor WCF Facility HTTPS
body: <p>I successfully integrated the Caste WCF Facility with my services. Now I try to configure an HTTPS communication based on BasicHttpBinding.</p>
  
  <p>According the following blog post, this should not be a big deal: <a href="http://blog.adnanmasood.com/2008/07/16/https-with-basichttpbinding-note-to-self/" rel="nofollow">http://blog.adnanmasood.com/2008/07/16/https-with-basichttpbinding-note-to-self/</a></p>
  
  <p>Here's my setup. On client-side, I configure the Windsor container using the following code:</p>
  
  <pre><code>    BasicHttpBinding clientBinding = new BasicHttpBinding();
  
      // These two lines are the only thing I changed here to allow HTTPS
      clientBinding.Security.Mode = BasicHttpSecurityMode.Transport;
      clientBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
      // Everything else worked well with HTTP
  
      clientBinding.MaxReceivedMessageSize = 163840;
      clientBinding.MaxBufferSize = (int)clientBinding.MaxReceivedMessageSize;
  
      container = new WindsorContainer();
      container.AddFacility&lt;WcfFacility&gt;();
      container.Register(
          Component.For&lt;IClientService&gt;()
          .AsWcfClient(new DefaultClientModel {
                Endpoint = WcfEndpoint.BoundTo(clientBinding)
                .At(configuration.Get(CFGKEY_SERVICE_CLIENT))
          })
       );
  </code></pre>
  
  <p>Besides that, I don't have any configuration on client-side. This worked well using HTTP communication.</p>
  
  <p>The server side got the following configuration within Web.config:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
    &lt;behaviors&gt;
      &lt;serviceBehaviors&gt;
        &lt;behavior name=""&gt;
          &lt;serviceMetadata httpsGetEnabled="true" /&gt;
          &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
        &lt;/behavior&gt;
      &lt;/serviceBehaviors&gt;
    &lt;/behaviors&gt;
    &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true"
      multipleSiteBindingsEnabled="true" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>When I'm trying to connect through https://, I get the following exception:</p>
  
  <p>System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at <a href="https://myuri.com/Services/Client.svc" rel="nofollow">https://myuri.com/Services/Client.svc</a> that could accept the message.</p>
  
  <p>Any ideas what's missing?
  Thank you in advance.</p>