I am trying to integrate with a Web Service end point which require Basic and Client Certificate for authentication using WCF. I tried below different setting based on suggestions online but still I am receiving "Could not establish secure channel for SSL/TLS with authority XXXXX". Server uses well known CA which is already available in Windows Certificate Store. In code I am adding ClientCredentials.UserName.UserName , ClientCredentials.UserName.Password & ClientCredentials.ClientCertificate.Certificate successfully.
1)
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Basic"/>
</security>
Result : "Could not establish secure channel for SSL/TLS with authority XXXXX"
2)
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Basic" />
<message clientCredentialType="Certificate" />
</security>
Result : Result : "Could not establish secure channel for SSL/TLS with authority XXXXX"
3)
<security mode="Transport">
<transport clientCredentialType="Certificate"/>
<message clientCredentialType="UserName" />
</security>
Result : The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm="Realm"'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
How to attach the Client Certificate using Basic Authentication since the server is expecting Basic authentication based on error returned when setting clientCredentialType as "Certificate".
Note: Using SOAPUI I can successfully connect with server