Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to get the hostname or IP address of the server?

Answer Posted / soumya

Dim myHost As String = System.Net.Dns.GetHostName
Dim myIPs As System.Net.IPHostEntry =
System.Net.Dns.GetHostByName(myHost)
MessageBox.Show("The name of the host is = " &
myIPs.HostName, "Host Name", MessageBoxButtons.OK,
MessageBoxIcon.Information)

For Each myIP As System.Net.IPAddress In myIPs.AddressList

MessageBox.Show("The IP address of host is = " &
myIP.ToString, "Host IP Address", MessageBoxButtons.OK,
MessageBoxIcon.Information)

Next

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Different between .net & j2ee ?

1072


What are situations when you register .NET assembly in GAC ?

1067


How to convert a .NET object into COM operabililty?

1014


Differentiate between 'DataSet' and 'SQLDataReader' in ADO.NET?

1104


What is finalize method in .net?

1102


What are the two main parts of the .net framework?

1061


What is difference between static page and dynamic page?

985


What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?

972


Explain garbage collection?

955


What is the use of activex control in .net?

1033


How many namespaces are in .net version 1.1?

1123


What is the new three features of COM+ services, which are not there in COM (MTS)

1947


What is .net and why it is used?

971


How do you create threading in.net?

974


How anonymous method is different from a lambda expression?

990