ASP.NET: get external IP address

后端 未结 5 1317
深忆病人
深忆病人 2020-12-17 07:13

I developed site. I need to get IP of site visitors. I try to use Request, but it have only internal IP:

Response.Write(Request.ServerVariables[\"REMOTE_ADD         


        
5条回答
  •  时光说笑
    2020-12-17 07:38

    Are you behind a load-balancer/proxy? If so, inspect the headers collection of the request for headers similar to X-FORWARDED-FOR.

提交回复
热议问题