I am connecting to a duplex WCF service with an x509 cert, specifying the certificate details in the client config file like this:
<behaviors>
<endpointBehaviors>
<behavior name="ScannerManagerBehavior">
<clientCredentials>
<clientCertificate findValue="ClientName" x509FindType="FindBySubjectName" storeLocation="CurrentUser" storeName="My" />
<serviceCertificate>
<authentication certificateValidationMode="PeerTrust" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
The code that then connects to the WCF service:
DuplexChannelFactory<IScannerManager> _smFactory
= new DuplexChannelFactory<IScannerManager>(instanceContext, nameOfEndPoint);
var _commsChannel = _smFactory.CreateChannel();
I now need to specify the client certificate name that will be used programatically, in code. Is it possible for me to do that? I can see that I can create my own x509Certificate2 class, but I'm not sure how to change/set the findValue="clientName"
bit...
Thanks