Επεξεργασία

Κοινή χρήση μέσω


SslClientAuthenticationOptions.TargetHost Property

Definition

Gets or sets the name of the server the client is trying to connect to. The name is used for server certificate validation and can be a DNS name or an IP address.

public:
 property System::String ^ TargetHost { System::String ^ get(); void set(System::String ^ value); };
public string? TargetHost { get; set; }
public string TargetHost { get; set; }
member this.TargetHost : string with get, set
Public Property TargetHost As String

Property Value

The name of the server the client is trying to connect to. If set to null (.NET 7 and later versions only) or an empty string, the client doesn't send the host name in the Server Name Indication extension.

Remarks

If the value is null or an empty string, you should also provide a RemoteCertificateValidationCallback and validate the subject of the server's certificate.

Applies to