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
Post a Comment