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

适用于