Vista - IP Address

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.
 
M

Mufaka

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.
 
R

Rick Strahl

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 ---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top