UserHostAddress gives wrong IPs

后端 未结 7 1640
[愿得一人]
[愿得一人] 2021-01-02 03:26

I collect statistics on IP addresses from where users visit my site and I have noticed what there are only two IP addresses presented, 172.16.16.1 and 172.16.16.248. The pro

7条回答
  •  暖寄归人
    2021-01-02 03:40

    Request.ServerVariables("REMOTE_ADDR") isn't work. this problem is because ur server is probably behind some proxy.(or connected to internet via some network) or your router settings are set as NAT (Network Address Translation) this technique doesnt pass ip to server. in such situations u can't get IP address using Asp.net however Java Provide applet using which u can get IP Address in any case.

    ( for Netscape, Mozilla and Firefox only, and Java must be enabled)

    
    

提交回复
热议问题