0
votes

I am trying to consume webservice over https protocol. I have password-protected p12 file with certificate. After importing this file I can view service methods over browser and I can add service as a ServiceReference in VisualStudio client application. Problem appears while invoking methods of this service. I tried almost everything and still get error 'Could not establish secure channel for SSL/TLS with authority {server_name}'. What can be wrong?

1
Have you used the NetworkCredential class for authenthication? msdn.microsoft.com/es-es/library/…Michael Hidalgo
no, I do not need credentialsuser1013552

1 Answers

1
votes

There are at least few possible causes but I would start by redefining the certificate validation callback:

ServicePointManager.ServerCertificateValidationCallback = (a,b,c,d) => true;

Put this like in your client code before you access the service.