簡體   English   中英

WCF服務中的客戶端IP地址格式

[英]The client IP address format in a WCF service

我正在使用最新的WCF版本。 我正在這樣獲取客戶端的IP地址:

        OperationContext context = OperationContext.Current;
        MessageProperties prop = context.IncomingMessageProperties;
        RemoteEndpointMessageProperty endpoint = prop[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
        string ip = endpoint.Address;

我得到的IP是:

:: 1

這是什么意思,有人可以向我解釋這種格式嗎?

是因為綁定嗎? 我使用basicHttpBinding

這是IPv6環回地址

https://en.wikipedia.org/wiki/Localhost

即客戶端在同一台計算機上,並使用IPv6連接到服務

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM