title: How to get Mac and IP address using ASP.NET C# of the login User
body: <p>I want to get the IP Address and the MAC Address of the user who login to the system (web application).
  I am using these to line of codes</p>
  
  <pre><code>    NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
  </code></pre>
  
  <p>I am using this method to get the MAC address, but the problem is I am getting the MAC Address of all the Adapters of the computer.</p>
  
  <p>HOW do I know which one is the right one?, how to get the right MAC Address of the device that is connected to my website??</p>
  
  <p>and also how to get the IP of the adapter too.</p>
  
  <p>when i try it on my pc it give 8 adapters with 8 MAC Addresses</p>
  
  <p>I am trying on my pc, I have a wired connection connected to IntraNet, and a wireless connected to internet.</p>