There is an old code on the WSE (Web Services Enhancements). Now in "sandbox" of service with which it works for HTTPS began to use self-signed certificat. And now in the sandbox i am getting error -- Could not create SSL / TLS secure channel. Something like this does not help.
System.Net.ServicePointManager.ServerCertificateValidationCallback =
(sender, certificate, chain, sslPolicyErrors) => true;
How i can to ignore a certificate?