string ip = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (string.IsNullOrWhiteSpace(ip))
{
ip
C#获取客户端IP方法
最新推荐文章于 2023-01-12 17:01:32 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
string ip = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (string.IsNullOrWhiteSpace(ip))
{
ip