У меня есть автономная служба WCF в Azure. Я пытаюсь создать настольный клиент и клиент приложения в стиле Metro. Я использую nettcpbinding с безопасностью транспорта и самозаверяющим сертификатом.
В Windows 7 этот код работает:
client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
client.GetUpdate(...);
но в приложении метро поле ServiceCertificate
не существует, поэтому я получаю (ожидаемое) исключение
The X.509 certificate CN=SPDEV-1-PC chain building failed.
The certificate that was used has a trust chain that cannot be verified.
Replace the certificate or change the certificateValidationMode.
A certificate chain processed, but terminated in a root certificate
which is not trusted by the trust provider.
как изменить CertificateValidationMode?