Jordan
Jordan

Reputation: 9911

Acquire client's MAC address.

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

Answers (3)

Simon Mourier
Simon Mourier

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):

Get Mac Address

get MAC Address of host

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

Jess
Jess

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

FreeAsInBeer
FreeAsInBeer

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

Related Questions