SSL Needs Certificates

There are many blogs out there describing how to configure a WCF service to use SSL (for example this one by Dominick Baier or this one at Microsoft’s that also shows how to do it in code). In short, here’s an example for such a configuration:



      <service name="WcfService2.Service1" behaviorConfiguration="sslServiceBehavior">

            <add baseAddress="https://localhost:44301/ssltest" />

        <!-- Expose the service over SSL -->
        <endpoint address="" binding="basicHttpBinding" contract="WcfService2.IService1"
        <!-- Expose the meta data over SSL -->
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />


        <binding name="sslBinding">
          <!-- This line activates SSL -->
          <security mode="Transport"/>

        <behavior name="sslServiceBehavior">
          <!-- Expose the meta data over SSL -->
          <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />



So far, nothing new here. Also not new is that this won’t work if no certificate is assigned to the service’s address. So if you’re trying to connect to your service with a browser and see something like this, you might not have assigned a certificate:


If you are asking how to assign a certificate, please read this.

Freelance full-stack .NET and JS developer and architect. Located near Cologne, Germany.

1 thought on “SSL Needs Certificates

Leave a Reply

Your email address will not be published. Required fields are marked *