WSE + self-signed certificat

77 views Asked by At

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?

1

There are 1 answers

0
cgotberg On

Should be able to do something like this to ignore cert validation.

ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

you could also see this question and answers for additional details that might better apply to your situation.

How to ignore the certificate check when ssl