UserHostName Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets the DNS name and, if provided, the port number specified by the client.
Namespace: System.Net
Assembly: System.Http (in System.Http.dll)
Syntax
'Declaration
Public ReadOnly Property UserHostName As String
public string UserHostName { get; }
public:
property String^ UserHostName {
String^ get ();
}
member UserHostName : string with get
function get UserHostName () : String
Property Value
Type: System. . :: . .String
A String value that contains the text of the request's Host header.
Remarks
The Host header contains the requested server host name and port number, if specified, separated by a colon (for example, www.contoso.com:8080).
You can use this property to return different responses depending on the host name specified in the request.
For a complete list of request headers, see the HttpRequestHeader enumeration.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.