Local machine's MAC address?

Discussion in 'ASP .Net' started by SJ, Mar 8, 2006.

  1. SJ

    SJ Guest

    How can I find the local Machine's MAC address using asp.net?

    Thanks,
    -SJ
     
    SJ, Mar 8, 2006
    #1
    1. Advertising

  2. SJ

    Bruce Barker Guest

    couple options.

    1) write an active/x control that lookup up the mac address
    2) write a .net control hosted by browser (will require user configure full
    trust)
    3) if the clients are on the local lan, ask the dhcp or wins servers for the
    transaction


    --- bruce (sqlwork.com)


    "SJ" <> wrote in message
    news:cmHPf.27011$...
    > How can I find the local Machine's MAC address using asp.net?
    >
    > Thanks,
    > -SJ
    >
    >
     
    Bruce Barker, Mar 8, 2006
    #2
    1. Advertising

  3. > How can I find the local Machine's MAC address using asp.net?

    The web server's or the client's?
     
    Gabriel Magaña, Mar 8, 2006
    #3
  4. SJ

    SJ Guest

    The Server's. Not the client's.

    -SJ.

    "Gabriel Magaña" <> wrote in message
    news:...
    > > How can I find the local Machine's MAC address using asp.net?

    >
    > The web server's or the client's?
    >
    >
     
    SJ, Mar 8, 2006
    #4
  5. If so, your original question is most confusing.

    What does your problem have to do with asp.net?

    To answer you question, try this:

    ManagementClass mc = new ManagementClass("Win32_NetworkAdapter");
    foreach (ManagementObject mo in mc.GetInstances())
    {
    string macAddr = mo["MACAddress"] as string;
    if ( macAddr != null && macAddr.Trim() != "" )
    return macAddr.ToString();
    }



    Eliyahu

    "SJ" <> wrote in message
    news:lSHPf.45679$...
    > The Server's. Not the client's.
    >
    > -SJ.
    >
    > "Gabriel Magaña" <> wrote in message
    > news:...
    >> > How can I find the local Machine's MAC address using asp.net?

    >>
    >> The web server's or the client's?
    >>
    >>

    >
    >
     
    Eliyahu Goldin, Mar 9, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. karim
    Replies:
    1
    Views:
    791
    George Ter-Saakov
    Jun 26, 2003
  2. UJ
    Replies:
    4
    Views:
    729
    John Rivers
    Sep 2, 2005
  3. Phil Hanna
    Replies:
    6
    Views:
    30,144
    Roedy Green
    Jul 5, 2003
  4. JAVA Rookie
    Replies:
    4
    Views:
    505
    Tor Iver Wilhelmsen
    Dec 11, 2003
  5. SJ

    Local machine's MAC address

    SJ, Mar 8, 2006, in forum: ASP .Net Security
    Replies:
    1
    Views:
    178
    Dominick Baier [DevelopMentor]
    Mar 8, 2006
Loading...

Share This Page