Dears
I have to consume soap service with certificate i have followed steps of this link
the certificate i am providing in .p12
i got the below error on certificate
Error
An error occurred while making the HTTP request to https:// **api.client. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server
Resolved issue by allowing access link from security team.
Hi Asif
This could be due to using SSL instead of TLS
https://stackoverflow.com/questions/2013880/wcf-error-this-could-be-due-to-the-fact-that-the-server-certificate-is-not-conf
still having same error for this code
public void MssCertificateAuthentication(byte[] ssClientCertificateContent) { ISOAPClient client = SoapRequest.GetCurrentClient(); var binding = client.Endpoint.Binding; if (ServicePointManager.SecurityProtocol == (SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls)) ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11; if (binding is BasicHttpBinding) { ((BasicHttpBinding)binding).Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate; } else if (binding is CustomBinding) { var httpsElement = ((CustomBinding)binding).Elements.Find<HttpsTransportBindingElement>(); if (httpsElement != null) { httpsElement.RequireClientCertificate = true; } } var cert = new X509Certificate2(ssClientCertificateContent); client.ClientCredentials.ClientCertificate.Certificate = cert; }
The error log in service center