Missing client certificate

Bevan Thomas 60 Reputation points
2025-02-07T07:19:38.0566667+00:00

I am using GetHttp2ClientCertificateAsync() to get the client certificate for authentication.When there are a lot of requests, the client certificates is seen to be missing.It is verified that the client does add the certificate for sure.What could be the possible reason here.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,090 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,277 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jiale Xue - MSFT 48,861 Reputation points Microsoft Vendor
    2025-02-07T07:53:09.6933333+00:00

    Hi @Bevan Thomas , Welcome to Microsoft Q&A,

    The most common cause is that the TLS handshake only occurs once due to HTTP/2 connection reuse, and if the client certificate is not negotiated in that handshake, all subsequent requests that reuse the connection will not have a certificate.

    Make sure the server requests and negotiates the client certificate during the TLS handshake phase, and confirm that the ClientCertificateMode setting is as expected.

    Verify that the client actually sends a certificate during the TLS handshake. See if the certificate can be obtained stably on a single connection to confirm whether the problem is caused by connection reuse.

    Locate whether the problem is caused by the client not sending a certificate, the server not correctly requesting a certificate, or the middle layer (such as a load balancer) forwarding improperly.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.