SslClientAuthenticationOptions.TargetHost Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.