I have some code that makes a call to a third party web service that is secured using X.509 certification.
If I call the code directly (using a unit test) it works without any problems.
When deployed, this code will be called via a WCF Service. I have added a second unit test that calls the WCF Service, however this fails with a CryptographicException
, message "Keyset does not exist"
when I call a method on the third party web service.
I presume that this is because my WCF Service will be attempting to call the third party web service using a different user to myself.
Can anyone shed any additional light on this issue?
This is most likely because the IIS user doesn't have access to the private key for your certificate. You can set this by following these steps...