X509ServiceCertificateAuthentication.RevocationMode 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 ChainTrust 與 PeerOrChainTrust X.509 憑證驗證模式的憑證撤銷模式。
public:
property System::Security::Cryptography::X509Certificates::X509RevocationMode RevocationMode { System::Security::Cryptography::X509Certificates::X509RevocationMode get(); void set(System::Security::Cryptography::X509Certificates::X509RevocationMode value); };
public System.Security.Cryptography.X509Certificates.X509RevocationMode RevocationMode { get; set; }
member this.RevocationMode : System.Security.Cryptography.X509Certificates.X509RevocationMode with get, set
Public Property RevocationMode As X509RevocationMode
屬性值
其中 X509RevocationMode一個值 : NoCheck, Online, , 或 Offline。
例外狀況
嘗試設定憑證何時是唯讀。
範例
以下程式碼說明如何設定這個屬性。
ClientCredentials creds = new ClientCredentials();
// Configure chain trust.
creds.ServiceCertificate.Authentication.CertificateValidationMode =
X509CertificateValidationMode.ChainTrust;
creds.ServiceCertificate.Authentication.RevocationMode =
X509RevocationMode.NoCheck;
這個屬性也可以在設定檔中設定。
備註
使用憑證時,系統會透過檢查用戶端憑證未被撤銷,確認該憑證未被撤銷。 此檢查可透過線上查詢或與快取的撤銷清單進行。 可透過將此屬性 NoCheck設定為 關閉撤銷檢查。