PDA

Click to See Complete Forum and Search --> : HTTPRequest - getting IP address


gollnick
Jan 30th, 2005, 07:28 AM
I am trying to figure out the best way of "getting" the IP address of users accessing a site. I know that using the IP address to identify unique users has a few flaws...
For example, I get a different IP address every time I use my RoadRunner account! Also for many users the converse is true and that IP addresses are the same for lots of users--for example, everyone logging into your site from ASNA's home office (thanks to our firewall) will report the same IP address.
BUT ... I really need to get something working on this... Anyone with any ideas?

gollnick

axion_sa
Jan 30th, 2005, 08:21 AM
string ipAddress = HttpContext.Current.Request.ServerVariables("REMOTE_ADDR");

gollnick
Jan 30th, 2005, 02:47 PM
thank you..... gollnick