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 tell us what is the difference between override and overload in a method?
What is the transport protocol you use to call a seb service soap?
can any one tel me the complete Testing Procedure of any one simple PROJECT i mean either web/windows based application?
Difference between class and interface in .net?
What is a .net class?
Explain me why do we use msmq?
How does linq work?
How does the generational garbage collector in the .net clr manage object lifetime? What is non-deterministic finalization?
i m fresher,hav SQL knowledge but in my ofc. i hav to work on dotnet. so plz tell me how to learn it,? from where to stat? i hav C prog. knowledge, ASP.net
How can you assign an rgb color to a system.drawing.color object?
Define marshling?
Explain difference between panel and groupbox classes using .net?
What is "common language runtime" (clr) in .net?
What is new in .net core?
Which Namespace is used to to achieve MultiThreading in .NET?