My apologies for replying to an old post, but the documentation page for
SessionOptions.TlsHostCertificateFingerprintdidn't give an example or specify the format for the fingerprint and had me stuck for a bit. Hopefully this will help someone else like me who ran into this issue after the server changed something and the OP's error started happening to our process. If you can connect via the WinSCP GUI, you can navigate to Session > Server/Protocol Information and the certificate fingerprint will be displayed. What messed me up is, in my case, the server certificate was a wildcard certificate used everywhere in our environment so I grabbed the "thumbprint" (Microsoft's nomenclature for the fingerprint) which has spaces instead of colons in between the byte segments of the fingerprint, and WinSCP kept throwing a "The value supplied is not valid..." error. I also tried no spaces, which didn't work as well. Example usage below:
TlsHostCertificateFingerprint = "00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33"