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
Is .net core free?
When we go for html server controls and when we go for web server controls?
How do you view the methods and members of a dll?
What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?
Which Namespace is used to to achieve MultiThreading in .NET?
Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component
How is meant by dll in .net?
Explain the difference between managed and unmanaged code?
What is the need of OLE-automation?
Please explain what are an object and a class?
Explain how to stop a thread?
What are the authentication methods in .net?
What are situations when you register .NET assembly in GAC ?
What is Event Bubbling in .NET?
What is managed code and managed data in .net?