【发布时间】:2021-02-10 19:42:10
【问题描述】:
我将 WCF 服务托管为 Windows 服务,我试图在服务器端(WCF 端)获取客户端(WPF 客户端)Mac 地址。我尝试使用以下代码行,但它也以 ::1 格式为我提供了客户端的 IP 地址。 RemoteEndpointMessageProperty prop = OperationContext.Current.IncomingMessageProperties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
prop.Address 是 ::1
我如何获取客户端Mac 地址,以便区分访问我的服务的客户端。 在某些情况下,同一网络下的客户端可能会给我相同的 IP 地址,这就是我正在寻找 Mac 地址 来识别客户端呼叫的原因。
【问题讨论】:
标签: c# wpf wcf client-server mac-address