This question is all about solving a SslPolicyError.RemoteCertificateNotAvailable
error.
I have developed a TCP Server with SSLStream and a TCP Client for the other end.
I authenticate the server with:
sslStream.BeginAuthenticateAsServer
I authenticate the client with:
sslStream.BeginAuthenticateAsClient
I am loading my client certificate from Trusted Publishers - Local Machine
.
Both are running on the same machine.
I tried loading the client certificate from the .cer and .pfx files rather than the trusted publishers store. But the server's client (remote) certificate validator callback fails by finding that SslPolicyErrors
has a RemoteCertificateNotAvailable
error.