I am trying to create a customBinding to call a web service with SOAP 1.2, TLS and a client certificate. As I undestand, this only works with customBinding.
I have defined the following behaviour:
<behaviors>
<endpointBehaviors>
<behavior name="TehRightBehaviour">
<clientCredentials>
<serviceCertificate>
<defaultCertificate findValue="WebInterface" x509FindType="FindBySubjectName" />
<authentication revocationMode="NoCheck" certificateValidationMode="None" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
The client does find the certificate, if I specify a wrong name, it raises and error. My binding looks like:
<customBinding>
<binding name="TehRealBinding">
<transactionFlow />
<textMessageEncoding messageVersion="Soap12" />
<security authenticationMode="MutualCertificate" />
<httpsTransport requireClientCertificate="true" />
</binding>
</customBinding>
And I combine it in the end point like:
<client>
<endpoint address="https://hestia1:8081/cm/main"
behaviorConfiguration="TehRightBehaviour"
binding="customBinding"
bindingConfiguration="TehRealBinding"
contract="BrightMain.CMMainService"
name="cmmain" />
</client>
The problem is, if I call the web service, it raises an Exception saying
“The client certificate is not provided. Specify a client certificate in ClientCredentials.”
I found that there are several points to specify certificates and obviously I am using the wrong one. So my question is: which is the right one?
Thanks in advance,
Christoph
Edit: Perhaps, I should learn to read, because specifying the <serviceCertificate> is obivously not suffictient. I will check this now…
I should be like this