.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

how to get MAC Address of client machine not the server.

Posted By: Pawan kumar Shukla     Posted Date: May 15, 2011    Points:5   Category :ASP.Net
can any one tell me how to get the mac address of machine, using JavaScript or asp.net

Author: Mahesh             
Posted Date: May 16, 2011     Points: 20   

Security settings prevent you from getting this information. On the client side or over a network website you can do it like this:

var strComputer = ".";
var objWMIService = GetObject("winmgmts:\\\\" + strComputer + "\\root\\cimv2");
var e = new Enumerator(objWMIService.ExecQuery("Select * from Win32_NetworkAdapter","WQL",48));

for (;!e.atEnd();e.moveNext())
{ objItem = e.item();
WScript.Echo ("MACAddress: " + objItem.MACAddress)

hope this helps..


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend