Error validating server certificate

The certificate is exported into a CER file that is being loaded.The full certificate with the private key is located on the Local Machine’s Personal and Trusted Root stores for the web application server.My hope is to provide more detail to revive this issue and hopefully get an answer for my issue. The main requirement is that a standalone process written in C# can call a Web API and be authenticated using a client certificate.The Web API in this POC is very simple and just returns a single value.Here is the code for the client that sends the request with a client certificate. When I run this test app I get back a status code of 403 Forbidden with a reason phrase of “Client Certificate Required” indicating that it is getting into my Require Https Attribute and it is not finding any client certificates.

Here are the setting in IIS for SSL for this web application.

If you have questions about a particular defect, please contact Customer Support.

APARs listed for a specific component apply only to that component.

But I got the same results where the server code does not retrieve any client certificates. Update 2: I am still trying to figure this out and have tried many different options but to no avail.

For completeness here is the code used to retrieve the certificate from a file: You will notice that when you get the certificate from a file it returns an object of type X509Certificate and when you retrieve it from the certificate store it is of type X509Certificate2. At one point during trying these options it started working.

Leave a Reply