This documentation is archived and is not being maintained.

HttpListenerRequest.GetClientCertificate Method

Retrieves the client's X.509 v.3 certificate.

Namespace: System.Net
Assembly: System (in system.dll)

Public Function GetClientCertificate As X509Certificate2
Dim instance As HttpListenerRequest
Dim returnValue As X509Certificate2

returnValue = instance.GetClientCertificate
public X509Certificate2 GetClientCertificate ()
public function GetClientCertificate () : X509Certificate2
Not applicable.

Return Value

A System.Security.Cryptography.X509Certificates object that contains the client's X.509 v.3 certificate.

Exception typeCondition


A call to this method to retrieve the client's X.509 v.3 certificate is in progress and therefore another call to this method cannot be made.

This method blocks until the certificate is retrieved.

Windows 98, Windows Server 2003, Windows XP Media Center Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0