Looking at your code, there's seems to be a flaw - when using SslCredentials, you can either use
1. the root certificate (cacert) in case you only want to authenticate the server and you don't care about authenticating the client. Example: "new SslCredentials(cacert)" - this seems to be what you want.
2. or you provide the full key certificate pair on the client, which will allow authenticating the client on the server. Example: new SslCredentials(cacert, new KeyCertificatePair(clientcert, privatekey));
What you are doing is something in-between these two and doesn't really make much sense.
Also, the KeyCertificatePair doesn't accept null for the private key and it's been like since 2years ago.
So I have trouble believing that your snippet actually worked in C# 1.3.6 version at all.