K
Koan B
Hi,
I'm attempting to connect to a 3rd party web service (for which they
have supplied client certificates), but with no success.
As far as I can tell, the code below should work, however, I always
get back an HTTP 403 (Forbidden) error returned. (I've also tried
loading the certificate from the certificate store with exactly the
same result.
I'm using a WSDL file as the basis for the interface to a web service
and using the following code (based on MSDN documentation):
/////////////////////////////////////////////////////////////////////
service = new RequestService();
// certificate is the path to a DER encoded x509 certificate
X509Certificate x509 =
X509Certificate.CreateFromCertFile(certificate);
service.ClientCertificates.Add(x509);
// Create a request object
RequestType request = new RequestType();
// Build request
// MakeRequest method of the service
ReplyType reply = service.MakeRequest(request);
/////////////////////////////////////////////////////////////////////
Cheers,
Koan
I'm attempting to connect to a 3rd party web service (for which they
have supplied client certificates), but with no success.
As far as I can tell, the code below should work, however, I always
get back an HTTP 403 (Forbidden) error returned. (I've also tried
loading the certificate from the certificate store with exactly the
same result.
I'm using a WSDL file as the basis for the interface to a web service
and using the following code (based on MSDN documentation):
/////////////////////////////////////////////////////////////////////
service = new RequestService();
// certificate is the path to a DER encoded x509 certificate
X509Certificate x509 =
X509Certificate.CreateFromCertFile(certificate);
service.ClientCertificates.Add(x509);
// Create a request object
RequestType request = new RequestType();
// Build request
// MakeRequest method of the service
ReplyType reply = service.MakeRequest(request);
/////////////////////////////////////////////////////////////////////
Cheers,
Koan