HttpRequest.UserHostName Proprietà

Definizione

Ottiene il nome DNS del client remoto.

public:
 property System::String ^ UserHostName { System::String ^ get(); };
public string UserHostName { get; }
member this.UserHostName : string
Public ReadOnly Property UserHostName As String

Valore della proprietà

String

Nome DNS del client remoto.

Esempio

Nell'esempio di codice seguente viene usato il metodo per codificare HTML il HtmlEncode valore della UserHostName proprietà e il WriteLine metodo per scrivere il valore codificato nel file. Questo esempio di codice fa parte di un esempio più grande fornito per la HttpRequest classe.

// Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.RequestType));
sw.WriteLine(Server.HtmlEncode(Request.UserHostAddress));
sw.WriteLine(Server.HtmlEncode(Request.UserHostName));
sw.WriteLine(Server.HtmlEncode(Request.HttpMethod));
' Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.RequestType))
sw.WriteLine(Server.HtmlEncode(Request.UserHostAddress))
sw.WriteLine(Server.HtmlEncode(Request.UserHostName))
sw.WriteLine(Server.HtmlEncode(Request.HttpMethod))

Si applica a