Vista - IP Address

  • Thread starter Thread starter Santel
  • Start date Start date
S

Santel

Hi,

Anyone please suggest me to retrieve the Vista machine's IP Address
from asp.net. I tried Request.ServerVariables["REMOTE_ADDR"], but no
success.
 
Santel said:
Hi,

Anyone please suggest me to retrieve the Vista machine's IP Address
from asp.net. I tried Request.ServerVariables["REMOTE_ADDR"], but no
success.
Try Request.UserHostAddress.
 
That's correct actually. ::1 is the IP V6 localhost IP address (ie.
equivalent to 127.0.0.1).

If you need IP V4 regular IP addresses you can turn off IP V6 on your net
connection.Or probably better convert an IP 6 Address using the Dns class.

This article should help:
http://aspnet.4guysfromrolla.com/articles/071807-1.aspx

Not sure though what the perf implications are of doing this.

+++ Rick ---
 
Back
Top