Uri.Authority Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

Namespace: System
Assembly: System (in System.dll)

Syntax

Public ReadOnly Property Authority As String
public string Authority { get; }

Property Value

Type: System..::.String
A String containing the authority component of the URI represented by this instance.

Exceptions

Exception Condition
InvalidOperationException

This instance represents a relative URI, and this property is valid only for absolute URIs.

Remarks

The 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 Authority component contains reserved characters, these are escaped in the string value returned by this property.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0

See Also

Reference

Uri Class

System Namespace