Search code examples
wcfvisual-studio-2010web-servicesx509

Consume Webservice in VS2010 using x.509 authentication


Google and stackoverflow seem to be silent on how to do this. I must be missing something but how do you get VS2010 to allow you to add a x.509 certificate and password to authenticate an SSL service reference so that you can add it to your project?

I am trying to connect to a webservice with an address similar to: https://services.acme.com/abc/service.wsdl

It requires the x.509 cert and password retrieve the wsdl. This is easy to do in SoapUI, but I can't seem to decipher how to get this going in VS2010.


Solution

  • Okay, so for anyone else who may not know how certificates work in the Microsoft world, VS2010 uses whatever certs you have imported on your machine to try and authenticate. You have to go into IE>Internet Options>Content>Certificates and then import your certificate here. After that, VS2010 will automatically look there for a cert which matches the URL you are using for your wsdl.