共用方式為


HttpWebRequest.ServerCertificateValidationCallback 屬性

定義

取得或設定回呼函式,以驗證伺服器證書。

public:
 property System::Net::Security::RemoteCertificateValidationCallback ^ ServerCertificateValidationCallback { System::Net::Security::RemoteCertificateValidationCallback ^ get(); void set(System::Net::Security::RemoteCertificateValidationCallback ^ value); };
public System.Net.Security.RemoteCertificateValidationCallback? ServerCertificateValidationCallback { get; set; }
public System.Net.Security.RemoteCertificateValidationCallback ServerCertificateValidationCallback { get; set; }
member this.ServerCertificateValidationCallback : System.Net.Security.RemoteCertificateValidationCallback with get, set
Public Property ServerCertificateValidationCallback As RemoteCertificateValidationCallback

屬性值

用來驗證伺服器證書的回呼函式。

備註

謹慎

WebRequestHttpWebRequestServicePointWebClient 已經過時,您不應該將它們用於新的開發。 請改用 HttpClient

預設值為未設定回呼函式,且 ServerCertificateValidationCallback 屬性 null

適用於