I am running a server, and I want to display my own IP address.
What is the syntax for getting the computer\'s own (if possible, external) IP address?
Someon
If you are running in intranet you'll be able to get local machine IP address and if not you'll get external ip address with this: Web:
//this will bring the IP for the current machine on browser
System.Web.HttpContext.Current.Request.UserHostAddress
Desktop:
//This one will bring all local IPs for the desired namespace
IPAddress[] localIPs = Dns.GetHostAddresses(Dns.GetHostName());