开发者

Find Remote IP using .net

开发者 https://www.devze.com 2022-12-20 10:55 出处:网络
i need to find the remote users ip address using asp.net and also i need clarification whether multiusers have same 开发者_高级运维ip address

i need to find the remote users ip address using asp.net and also i need clarification whether multiusers have same 开发者_高级运维ip address

thanks Shakthi


Dim userIP As string = Request.UserHostAddress


Edit Caveat - the below is talking about an internet scenario. On a more limited (intranet) network, you may be able to assume a 1-1 User-IP Address mapping

Multiple users may appear to have the same IP address.

The same user may make two requests in a row from different IP addresses.

Whatever you're trying to do, using the users IP address for anything other than logging is probably pointless.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号