Hi All,
I need to call a web service where the server requires us to authenticate with a certificate.
The following code works as long as the certificate is installed in the Windows certificate store:
However, I don't quite understand why the certificate must be installed in the certifocate store given that I am providing the file location and password.
Due to the vast amount of info on calling web services I'm struggling with Google, but one old article suggested that perhaps .Net is only extracting the public key from the certificate file.
This is more a curiosity than an issue, but would appreciate any explanation!
Thanks,
Graeme
"Just beacuse you're paranoid, don't mean they're not after you
I need to call a web service where the server requires us to authenticate with a certificate.
The following code works as long as the certificate is installed in the Windows certificate store:
Code:
MyTestService service = new MyTestService();
service.Url = targetEndPoint;
service.Proxy = new WebProxy("[URL unfurl="true"]http://my.proxy.com");[/URL]
service.ClientCertificates.Add(new X509Certificate(@"c:\cert\mycert.p12", "pwd"));
service.WebMethod()
However, I don't quite understand why the certificate must be installed in the certifocate store given that I am providing the file location and password.
Due to the vast amount of info on calling web services I'm struggling with Google, but one old article suggested that perhaps .Net is only extracting the public key from the certificate file.
This is more a curiosity than an issue, but would appreciate any explanation!
Thanks,
Graeme
"Just beacuse you're paranoid, don't mean they're not after you