System.Net.ServicePointManager.ServerCertificateValidationCallback Property

Gets or sets the callback to validate a server certificate.

Syntax

public static System.Net.Security.RemoteCertificateValidationCallback ServerCertificateValidationCallback { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

An application can set the ServicePointManager.ServerCertificateValidationCallback property to a method to use for custom validation by the client of the server certificate. When doing custom validation, the sender parameter passed to the System.Net.Security.RemoteCertificateValidationCallback can be a host string name or an object derived from System.Net.WebRequest (System.Net.HttpWebRequest, for example) depending on the ServicePointManager.CertificatePolicy property.

When custom validation is not used, the certificate name is compared with host name used to create the request. For example, if WebRequest.Create(string) was passed a parameter of "https://www.contoso.com/default.hmtl", the default behavior is for the client to check the certificate against www.contoso.com.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0