Consume Web Service HTTPS (with certificate for authentication)
I am trying to consume a Web Service HTTPS (using a certificate authentication). I have added my Web Service in my Web Reference on my project and "myCertificate.cer" has imported to Console Root\Certificates\Personal. I have an error 401: The request failed with HTTP status 401: Unauthorized. Any idea? .... using System.Security.Cryptography.X509Certificates; ... string certPath = @"C:\myCertificate.cer"; // Load the certificate into an X509Certificate object. X509Certificate cert = X509Certificate.CreateFromCertFile(certPath); // Create an instance of the Web service proxy. zgetuser