HttpListenerRequest.IsLocal 속성

정의

요청을 로컬 컴퓨터에서 보냈는지 여부를 나타내는 Boolean 값을 가져옵니다.

public:
 property bool IsLocal { bool get(); };
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public bool IsLocal { get; }
public bool IsLocal { get; }
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
member this.IsLocal : bool
member this.IsLocal : bool
Public ReadOnly Property IsLocal As Boolean

속성 값

요청을 제공한 HttpListener 개체와 동일한 컴퓨터에서 요청이 시작되었으면 true이고, 그렇지 않으면 false입니다.

특성

예제

다음 코드 예제는 IsLocal 속성입니다.

public static void ShowRequestProperties2 (HttpListenerRequest request)
{
    Console.WriteLine("KeepAlive: {0}", request.KeepAlive);
    Console.WriteLine("Local end point: {0}", request.LocalEndPoint.ToString());
    Console.WriteLine("Remote end point: {0}", request.RemoteEndPoint.ToString());
    Console.WriteLine("Is local? {0}", request.IsLocal);
    Console.WriteLine("HTTP method: {0}", request.HttpMethod);
    Console.WriteLine("Protocol version: {0}", request.ProtocolVersion);
    Console.WriteLine("Is authenticated: {0}", request.IsAuthenticated);
    Console.WriteLine("Is secure: {0}", request.IsSecureConnection);
}
Public Shared Sub ShowRequestProperties2(ByVal request As HttpListenerRequest)
    Console.WriteLine("KeepAlive: {0}", request.KeepAlive)
    Console.WriteLine("Local end point: {0}", request.LocalEndPoint.ToString())
    Console.WriteLine("Remote end point: {0}", request.RemoteEndPoint.ToString())
    Console.WriteLine("Is local? {0}", request.IsLocal)
    Console.WriteLine("HTTP method: {0}", request.HttpMethod)
    Console.WriteLine("Protocol version: {0}", request.ProtocolVersion)
    Console.WriteLine("Is authenticated: {0}", request.IsAuthenticated)
    Console.WriteLine("Is secure: {0}", request.IsSecureConnection)
End Sub

설명

애플리케이션이이 속성을 사용 하 여 로컬 컴퓨터에서 요청 되 면 특수 처리를 수행할 수 있습니다.

적용 대상

추가 정보