title: Get client's IP Address in common c# Class Library for WebAPI and WebApplication
body: <p>My business layer is common for WebApi and WebApplication. Need to track the client's IP address for each action. Searched on web and tried this but on development but I think this is for Server . I am getting server's ip address:</p>
  
  <pre><code>var host = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName());
  string ipAddress = host.AddressList[1].ToString();
  </code></pre>