共用方式為


HttpListenerRequest.GetClientCertificate 方法

定義

擷取用戶端的 X.509 v.3 憑證。

public:
 System::Security::Cryptography::X509Certificates::X509Certificate2 ^ GetClientCertificate();
public System.Security.Cryptography.X509Certificates.X509Certificate2? GetClientCertificate ();
public System.Security.Cryptography.X509Certificates.X509Certificate2 GetClientCertificate ();
member this.GetClientCertificate : unit -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Function GetClientCertificate () As X509Certificate2

傳回

System.Security.Cryptography.X509Certificates 物件,包含用戶端的 X.509 v.3 憑證。

例外狀況

呼叫這個擷取用戶端 X.509 v.3 憑證的方法正在進行中,因此不可再次呼叫這個方法。

備註

這個方法會封鎖直到擷取憑證為止。

適用於

另請參閱