How to get the hostname or IP address of the server?
Answers were Sorted based on User's Feedback
Answer / praveen
string IpAddress=HttpContext.Current.Request.UserHostName;
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / 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 |
What is data type and how many types of data types are in .NET ?
Explain dataset.acceptchanges and dataadapter.update methods in .net?
What is the best way to crack the certification?
What is the benefit of .net core?
Compare client server application with n-tier application
What is Finalizer in .NET define Dispose and Finalize ?
What is a formatter?
I am looking for a fast track course (MAX 15 days) in MS.NET 3.5 and SQLSERVER 2005 in hyderabad or mumbai or pune. I am working in mumbai so cannot gor for long course. Can any body suggest me the best couching class or best faculty for the same. Thanks.
Explain the different parts of an assembly?
Can a dll be changed to an exe?
What is the use of ErrorProvider Control in .NET?
What are the features of dot net?