Skip to main content


Showing posts from April, 2012

Connecting to SOAP service with certificate authentication

I have rarely worked with certificate based authentication, so when I got this neat little SOAP service with certificate authentication in my hands I gladly accepted the challenge. All I got was the URL to the service with a certificate and the password. I also got an example written in PHP: $client = new SoapClient("", array(         'local_cert' => 'client_certificate.pem', 'passphrase' => 'PASSPHRASE',         'cache_wsdl' => WSDL_CACHE_NONE )); This of course looks very easy, but we all know that it's not really that easy if I want to use .NET and WCF. First of all the PEM-certificate cannot natively be used in .NET. Second of all I don't have the WSDL for the service. Here are the steps I had to go through to be able to successfully connect to the SOAP service. Convert the certificate The certificate I received was a PEM certificate which included both the private and public key. .NET