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 alias ? Is it used in .Net ?
How can we convert XML data into DataBase table IN .Net?
what is the use of "mustinherit" keyword?
What are the authentication methods in .net?
SAP Business One(this is intigrated tool of .net)
Please explain what is the difference between encrypting a password and applying a hashing?
How to store and retrieve images in SQL server database through VB.NET?
What is different between Web User Control and Web Custom Control?
Explain what rare the types of jit and what is econo-jit?
What application do you use to install a Windows service?
What is Global Assembly Cache (GAC) and what is the Purpose of it?
What is the advantage of packaging over xcopy in .net?