private string CurrentDNSName
{
get
{
return base.Request.Url.Host.ToLower();
}
}
following method will return the IP address of your website-
private string CurrentServerIPAddress
{
get
{
return Dns.GetHostAddresses(this.CurrentDNSHame)[1].ToString();
}
}