title: How to get ip address for the local system
body: <p>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.</p>
  
  <p>So far I have this code:</p>
  
  <pre><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
  </code></pre>