获取客户端ip

string ip = HttpContext.Current.Request.UserHostAddress;

用心写代码,不辜负程序员之名。
原文地址:https://www.cnblogs.com/thinkingthigh/p/2876295.html