Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




Get Website IP Address in Asp.net

Some time we may need to find out the Ip address of the given website. we may write this code to find out the ip address of the website.

try
{
System.Net.IPAddress[] ip = System.Net.Dns.GetHostAddresses("www.xpode.com"); Response.Write(ip[0]);
}
catch (System.Net.Sockets.SocketException)
{
Response.Write("No Such Website!");
}

Helpful Website Url
http://www.codedigest.com/CodeDigest/114-Get-Website-IP-Address-in-ASP-Net.aspx
Share this article   |    Print    |    Article read by 2078 times
Author:
Rohit kakria
I am software developer, moderator of xpode.com
Related Articles:
Related Interview Questions: