Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF - SSL Service

I have a service that uses SSL. When I try to browse to the service I get the following error:

The SSL settings for the service 'SslRequireCert' does not match those of the IIS 'None'. 

My config is as follows:

<security mode="Transport">
        <transport clientCredentialType="Certificate" />
      </security>

I am using IIS Express and I have "Enable SSL" checked (verified in WebMatrix).

Any ideas what else I need to do?

like image 270
user472292 Avatar asked Feb 23 '23 18:02

user472292


1 Answers

Ok. It looks like I needed to update the applicationhost.config file (in IIS Express). I added a location for my site and set sslFlags="Ssl, SslAcceptCert, SslRequireCert". This allowed me to enable SSL authentication. Then when I tried to access the service with a client I got a message that there was an error establishing a trust relationship. This was because I did not have the server's certificate in my trusted people folder (or it might have been the client, I'm not sure as the service and client is on my local PC). After doing that, the service will work, however we do not want to have to give our certificate to the client, so I ended up using the TransportWithMessageCredential security mode.

like image 85
user472292 Avatar answered Mar 03 '23 23:03

user472292