Raghavendra T V wrote:
Hi,
You can use the HttpReferer to find the IP address .
Generally speaking, you cannot. First, referrer identifies the resource (web
page) from which the request was made (hyperlink clicked on), which is
normally not the user's host. If you don't click a hyperlink or use any
other navigation control, there'll be no referrer anyway. Also, both clients
and proxies are free to change or omit this header, so don't blindly assume
it's there.
You can obtain the client IP address through the HttpRequest.UserHostAddress
property, but that's only the last client in the request chain (could be a
proxy for example).
You'll have to use a mixture of UserHostAddress and extension headers like
X-Forwarded-For to obtain more relibale data, and even that won't be
perfect.
Cheers,
--
Joerg Jooss
jo*********@gmx.net