title: How to get a mac address
body: <p>Can I get a MAC address that are connected to my site.</p>
  
  <p>this code get mac address host and return error permission.</p>
  
  <pre><code>  String macadress = string.Empty;
  
          foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
          {
              OperationalStatus ot = nic.OperationalStatus;
              if (nic.OperationalStatus == OperationalStatus.Up)
              {
                  macadress = nic.GetPhysicalAddress().ToString();
                  break;
              }
          }
  
          return macadress;
  </code></pre>
  
  <p>now how can get mac address users???</p>
  
  <p>2.
  how can get ip users???</p>