public class Service2 : IService2
{
public User DoWork()
{
Console.WriteLine(ClientIpAndPort());
return new User { Name = "sdf", Age = };
}
public string ClientIpAndPort()
{
OperationContext context = OperationContext.Current;
MessageProperties properties = context.IncomingMessageProperties;
RemoteEndpointMessageProperty endpoint = properties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty; return endpoint.Address+"port"+endpoint.Port;
}
}

最新文章

  1. 【leetcode】Palindrome Number
  2. vs运行时候冒了这个错:无法启动IIS Express Web 服务器~Win10
  3. URI和URL、URN区别
  4. Visual Studio 拓展插件——Image Optimizer
  5. Enum:Backward Digit Sums(POJ 3187)
  6. Django.template框架 template context (非常详细)
  7. 使用AS3.0代码实现给图片添加滤镜的模糊与斜角效果
  8. pyqt4制作透明无边框窗体
  9. Math.round(11.5)等于()Math.round(-11.5)等于()
  10. Week11(11月19日):补课
  11. Quick Cocos2dx CCLuaStack has no member names 'loadChunksZip'
  12. IOC 的理解与解释
  13. luogu5020 [NOIp2018]货币系统 (完全背包)
  14. FS G729转码测试记录
  15. 基于TerraExplorer Pro 6.1 实现对Shape中Feature对象拾取查询
  16. Python3科学计算库概况
  17. siblings()
  18. Hammer.js 实现移动端元素的拖拽库
  19. iOS 出现错误reason: image not found的解决方案
  20. Xcode And iOS9新特性

热门文章

  1. NODE-WEBKIT教程(5)NATIVE UI API 之FRAMELESS WINDOW
  2. C#为什么不能像C/C++一样的支持函数只读传参
  3. 使用 xUnit 编写 ASP.NET Core WebAPI单元测试
  4. .net core 分布式配置中心
  5. 【BZOJ4827】 [Hnoi2017]礼物
  6. 201621123018《Java程序设计》第5周学习报告
  7. Android------------------的快捷键的使用
  8. Java并发编程总结5——ThreadPoolExecutor
  9. pringboot+mybatis+redis+cookie单点登录
  10. while循环中使用scanf函数