title: Getting the MAC-Address of a client with a browser
body: <p>I have the following problem:
  I have a webserver. This webserver is behind a router. The problem is, I need the MAC-Address of a client that opens a website on the server for further purposes. I tried already to get the MAC-Address via an ActiveX-Object, but the client needs WMI installed. Here is the actual code:</p>
  
  <pre><code>&lt;!DOCTYPE  HTML  PUBLIC  "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
  &lt;html&gt;
    &lt;head&gt;
          &lt;title&gt;&lt;/title&gt;
          &lt;meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"&gt;
          &lt;meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"&gt;
          &lt;script id="clientEventHandlersJS" language="javascript"&gt;
  
  function Button1_onclick() {
    var locator = new ActiveXObject("WbemScripting.SWbemLocator");
    var service = locator.ConnectServer(".");
    var properties = service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
    var e = new Enumerator (properties);
    document.write("&lt;table border=1&gt;");
    dispHeading();
    for (;!e.atEnd();e.moveNext ())
    {
          var p = e.item ();
          document.write("&lt;tr&gt;");
          document.write("&lt;td&gt;" + p.Caption + "&lt;/td&gt;");
          document.write("&lt;td&gt;" + p.IPFilterSecurityEnabled + "&lt;/td&gt;");
          document.write("&lt;td&gt;" + p.IPPortSecurityEnabled + "&lt;/td&gt;");
          document.write("&lt;td&gt;" + p.IPXAddress + "&lt;/td&gt;");
          document.write("&lt;td&gt;" + p.IPXEnabled + "&lt;/td&gt;");
          document.write("&lt;td&gt;" + p.IPXNetworkNumber + "&lt;/td&gt;");
          document.write("&lt;td&gt;" + p.MACAddress + "&lt;/td&gt;");
          document.write("&lt;td&gt;" + p.WINSPrimaryServer + "&lt;/td&gt;");
          document.write("&lt;td&gt;" + p.WINSSecondaryServer + "&lt;/td&gt;");
          document.write("&lt;/tr&gt;");
    }
    document.write("&lt;/table&gt;");
  }
  
  function dispHeading()
  {
      document.write("&lt;thead&gt;");
      document.write("&lt;td&gt;Caption&lt;/td&gt;");
      document.write("&lt;td&gt;IPFilterSecurityEnabled&lt;/td&gt;");
      document.write("&lt;td&gt;IPPortSecurityEnabled&lt;/td&gt;");
      document.write("&lt;td&gt;IPXAddress&lt;/td&gt;");
      document.write("&lt;td&gt;IPXEnabled&lt;/td&gt;");
      document.write("&lt;td&gt;IPXNetworkNumber&lt;/td&gt;");
      document.write("&lt;td&gt;MACAddress&lt;/td&gt;");
      document.write("&lt;td&gt;WINSPrimaryServer&lt;/td&gt;");
      document.write("&lt;td&gt;WINSSecondaryServer&lt;/td&gt;");
      document.write("&lt;/thead&gt;");
  }
  
          &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
  
          &lt;INPUT id="Button1" type="button" value="Button" name="Button1" language="javascript" onclick="return Button1_onclick()"&gt;
    &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>When you click on the button, it should return a table with the network configuration, but that doesn't work for me. I'd like to know, if there is another solution for getting the MAC-Address of a client via browser. I also don't want to limit the usage on Internet Explorer. Thanks in advance for your help.</p>
  
  <p>Regards,
  Chris</p>