Hi friends. I am developing an application in which I am returning the IP address for a particular system and saving it in a database. When I check the database it is showing the server ip address. I want get the particular ip address who is running that application.
So far I have this code:
Public Function GetIPAddress() As String
Dim strHostName As String = System.Net.Dns.GetHostName()
Dim strHostName1 As String = System.Net.Dns.GetHostName()
Dim ipHostInfo As System.Net.IPHostEntry = System.Net.Dns.Resolve(System.Net.Dns.GetHostName())
Dim ipAddress As System.Net.IPAddress = ipHostInfo.AddressList(0)
Return ipAddress.ToString()
End Function