Getting Client IP Address

  • Thread starter Thread starter Waldy
  • Start date Start date
W

Waldy

Hi there,
there are many articles on the web describing how to retrieve
the IP Address of the client machine that is connected to your web server.
The examples all seem to use the ServerVariables to get this. Why would you
use:

Request.ServerVariables["HOST_ADDR"]

rather than the built in attribute like so?:

Request.UserHostAddress
 
Mark Rae said:
FYI, capturing the IP address from the Request object is, essentially, a
complete waste of time since it cannot be relied upon at all due to
proxies, NAT, and the fact that it's so easy to spoof anyway...

So what do you recommend? It should not be a problem in this case as I
simply want to capture the client machine name for an internal web based
support system.
 
Back
Top