//提供方法执行的上下文环境
            OperationContext context = OperationContext.Current;
            //获取传进的消息属性
            MessageProperties properties = context.IncomingMessageProperties;
            //获取消息发送的远程终结点IP和端口
            RemoteEndpointMessageProperty endpoint = properties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
            Logger.WriteLog("请求来直哪里:" + endpoint.Address);

 

posted on 2015-08-15 16:28  leojon  阅读(1040)  评论(0编辑  收藏  举报