Forum Moderators: mack

Message Too Old, No Replies

get Ip Address

capture ip address

         

rikb53

8:12 pm on Dec 8, 2006 (gmt 0)

10+ Year Member



how can i capture the ip address of someone accessing a web page.
is it in the response object?
something like:
Response.Write(Request.UserHostAddress.ToString())
?
any help is appreciated.
thanks again
rik

Brad_H

9:09 pm on Dec 8, 2006 (gmt 0)

10+ Year Member



If you are using IIS, then it is part of the Request object:

Request.ServerVariables("REMOTE_ADDR")

Response.Write(Request.ServerVariables("REMOTE_ADDR"))

rikb53

2:23 pm on Dec 11, 2006 (gmt 0)

10+ Year Member



Brad, Thanks so much. that's exactly what i was looking for.