HttpRequest.UserHostAddress 속성

정의

원격 클라이언트의 IP 호스트 주소를 가져옵니다.

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

속성 값

String

원격 클라이언트의 IP 호스트 주소입니다.

예제

다음 코드 예제에서는 메서드를 HtmlEncode 사용하여 속성 값 UserHostAddressWriteLine 메서드를 HTML로 인코딩하여 인코딩된 값을 파일에 씁니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 HttpRequest 클래스입니다.

// 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))

적용 대상