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.

One thought on “SSL Needs Certificates

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s