SslStream.TargetHostName Property

Definition

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

C#
public string TargetHostName { get; }

Property Value

The name of the server the client is trying to connect to.

Applies to

Product Versions
.NET 5, 6, 7, 8, 9, 10