System.Uri.Authority Property

Gets the Domain Name System (DNS) host name or IP address and the port number for a server.

Syntax

public string Authority { get; }

Value

A string containing the authority component of the current instance. The value returned by this property is composed of the values returned by the Uri.Host and Uri.Port properties.

Remarks

The Uri.Authority property is typically a server DNS host name or IP address. This property might include the service port number if it differs from the default port for the URI. If the Uri.Authority component contains reserved characters, these are escaped in the string value returned by this property.

Requirements

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