how can I send a certificate with a request in debug mode?

kilobyte

Newcomer
Joined
Sep 10, 2003
Messages
8
Hello

I've built a windows test client for a web service I have, and I'm trying to attach a certificate to the request from the test client to the web service. This works fine in when in release mode, but the certificate does not seem to be attached when in debug mode. Can anybody figure out why this is?

Here's the code where I attach the certificate:

(WS is the web service)

WS.ClientCertificates.Clear();
X509Certificate certificate = X509Certificate.CreateCertFromFile( @"C:\cert.cer" );
ServicePointManager.CertificatePolicy = new ServerCertificatePolicy();
WS.ClientCertificates.Add( certificate );
 
Back
Top