views:

301

answers:

6

I have deployed a website in my server, how i know which what my server IP is ?

if i know my server ip , i could access my website from outside

A: 

Simple way is to ping your hostname. E.g.,

ping microsoft.com

Note you'll need to do this from outside your server's netork, as you may get an internal private IP otherwise.

RedFilter
only if the DNS Is setup...
madcolor
A: 

The IP of the server is the same IP as the host (machine) where it is located, if the server is in your LAN.

You will be able to access your website from outside if your proxys allows it.

I don't really understand what you are talking about saying "my server".

eKek0
+1  A: 

If you know your hostname you can use nslookup to get the ip adress. Alternatively you can find all the ip adresses on the network cards using ipconfig. So either:

nslookup hostname

Or

ipconfig /all

You could also use netstat -n to find the ip adress listening on port 80 (which is the default for http)

Peter van der Heijden
A: 

try ping servername and/or ping url

klabranche
A: 

Do it in the code..

Request.ServerVariables("LOCAL_ADDR")

OR

String name = "";
name = Dns.GetHostName();
IPHostEntry ipEntry = Dns.GetHostByName(name);
foreach (IPAddress ipaddress in ipEntry.AddressList)
{
    Response.Write("IP : " + ipaddress.ToString());
}
madcolor
A: 

First, check with the IIS Console. Right click web site + properties. The tab named "Web Site" shows the "IP Address". This btw could be "All unassigned", so you'd have to do an ipconfig on the server, and deduct IPs explicitly used by other web sites.

Second, beware that this address could be mapped to some other [public] address at the level of a firewall / gateway / WSD device on between the server and the client.

Third (or first), using "ping" or "nslookup" as indicated in other replies, ensure that the name that will be used as part of the url matches the IP discovered above.

mjv