views:

8

answers:

1

I've got a WCF client and service. The service is configured to use a certificate for encryption. This is all working fine. We're using self-signed certificates for testing.

Except that one of my QA guys has deleted the certificate from his client PC and he can still connect to the service.

This leads to my question:

In Internet Explorer (and other browsers), when you're connected via HTTPS, you can see the server's certificate by clicking on the padlock icon. I'd like to do something similar in my WCF client, so that the user can verify the server's identity. Is there a way in my WCF client to get hold of the server certificate and to display it?

A: 

The encryption will use the server side certificate, just like it does for a https site.

You could use the client certificates for authentication, but this is something else.

Shiraz Bhaiji
Yeah. I know. WCF over SSL verifies the server's certificate, in the same way that a browser does for HTTPS. The browser allows you to examine the server's certificate. Is there a way to do this in WCF?
Roger Lipscombe