We are facing issue while trying to connect to a third party web service (webmethod) using certificate authentication using C#.NET. When we try the same through Soup UI, after installing client’s chain certificate in JKS (Java Key Store), it is working perfectly.
We are trying to pass the exported PFX certificate using
X509Certificate2(“.pfx file path” , ”password”) or using
objClient.ClientCredentials.ClientCertificate.SetCertificate(StoreLocation.LocalMachine, StoreName.Root, X509FindType.FindBySubjectName, "Certificate");
We are getting below error "The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was ''."
In the diagnostics log we are getting “The remote server returned an error: (401) Unauthorized.”
The same thing works perfectly when the authentication is user name and password instead of SSL.
Request you to kindly help us on this, this is becoming a show stopper for product to go live.
Kindly do the needful.