How to get the public IP address of localhost using asp.net c#? -


my problem have 127.0.0.1 private ip address of localhost.

how can public ip address of localhost using c# asp.net?

try code

iphostentry host = dns.gethostentry(dns.gethostname()); ipaddress ip= host.addresslist.where(ip => ip.addressfamily == addressfamily.internetwork).firstordefault(); 

update looking public ip

to should use http services http://checkip.dyndns.org

check this answer exist in so


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -