I deployed a site on my server, how do I know what my server IP address is?
if I know my server ip address, I can access my site from the outside
If you know your hostname, you can use nslookupto obtain an IP address. In addition, you can find all ip addresses on network cards using ipconfig. So either:
nslookup
ipconfig
nslookup hostname
or
ipconfig /all
You can also use netstat -nto find the ip address listening on the port 80(default for http)
netstat -n
80
IIS. - + . "-" "IP-". " ", ipconfig IP-, -.
-, , - [] //WSD .
( ), "ping" "nslookup", , , , URL-, IP-, .
ping . .
ping microsoft.com
, netork, IP- .
IP- - IP-, (), , .
, .
, , " ".
ping _ / URL- ping
.
Request.ServerVariables("LOCAL_ADDR")
String name = ""; name = Dns.GetHostName(); IPHostEntry ipEntry = Dns.GetHostByName(name); foreach (IPAddress ipaddress in ipEntry.AddressList) { Response.Write("IP : " + ipaddress.ToString()); }
Source: https://habr.com/ru/post/1717672/More articles:Ignoring the optional greedy regex suffix - regexHow do you output the column in the upper case in a LINQ to SQL query? - c #Stop debugging, but keep running the application (VS2008 asp.net web application) - debuggingPower calculation algorithm - javaHow to make visual studio open the Im controller at the moment by default when debugging? - visual-studio-2008make sites accessible for visually impaired people? - accessibilityHow to debug IE print problem - cssWhy doesn't eclipse run my php file? - eclipseHow do different programming languages use closures? - closuresErlang: is there an equivalent to the C # preprocessor directive ##? - cAll Articles