Hello
I'm trying to call a webservice, which requires a certificate to work, the certeficate installed
on local machine in mmc.
i need to add a certificate using code to the web service instance.
- NeqatyWSDL.NeqatyWSAPI neqatyWSAPI = new NeqatyWSDL.NeqatyWSAPI();
- neqatyWSAPI.Url = "https://simb140.margento.com:48728";
-
- X509Certificate2 cert = new X509Certificate2(@"D:\cert.p12","pass",X509KeyStorageFlags.DefaultKeySet);
-
- neqatyWSAPI.ClientCertificates.Add(cert);
-
-
- neqatyWSAPI.authorize(authorize);
The debugger stoped at the last line and raise error with the follwing:
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.