在之前的ASP.NET可以通过Request.UserHostAddress获取客户端IP地址,那在OWIN中如何获取客户端IP地址呢?
http://stackoverflow.com/questions/19848047/get-remote-host-ip-in-web-api-self-hosted-using-owin
原来换了个名字:Request.RemoteIpAddress
You know:http://www.strathweb.com/2013/07/owin-middleware-asp-net-web-api-and-clients-ip-address/
嗯,通过 request.Environment["server.RemoteIpAddress"]; 也可以。