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

Explain me what is the .net framework and how does it work?

1103


What is web.config in .net?

1035


Tell us what do the following acronyms in .net stand for: il, cil, msil, cli and jit?

950


What are the differences between user control and server control?

1118


Explain what is the difference between a class and an object?

1261


Is .net a programming language?

975


What is the root class in .net?

1153


What is RPC? What is the use of it?

1173


Is there any inbuilt tool or command provided by .NET to view the code inside the assembly?

1003


Explain about managed heap?

1103


Explain how do assemblies find each other?

1085


Explain what is the difference between a class and an object, and how do these terms relate to each other?

1004


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

1084


What are the similarities and difference between class and structure in .net?

1023


Explain how com+ related to the dna architecture?

1015