Reputation: 9911
Is there a fairly simple way to acquire a client's MAC address from an ASP.Net web application.
I'm 4.0 all the way, and I'm using Visual Studio 2010.
Edits
LISTEN! Please do not close my issue! The one that jmccarthy linked to is not the same. My requests are NOT coming from a web browser. I should have been more clear.
Upvotes: 2
Views: 3542
Reputation: 139187
It's not in general possible nor meaningful, since the frames have probably passed though many routers and network equipments before getting to your server.
If you still want to do it from the server, without adding anything to your clients, here are some links with C# code to determine the MAC address from an IP Adress (you could then use ASP.NET Request variable):
Be aware that this could cause heavy performance problem if you do this on standard ASP.NET request thread. You might want to do it in someasynchronous fashion.
Upvotes: 0
Reputation: 42948
If your requests aren't coming from a web browser, then you have to modify the client to send its MAC address. If you don't have control of the client, you're simply not getting the MAC from it.
Upvotes: 1
Reputation: 12979
I don't think there is any cross-browser method of doing this short of using some sort of plugin (ActiveX).
Upvotes: 0