-3

AnyOne can help me to get client mac address and system name in mvc or C#? when anyone can access my website

  • Check [this SO](https://stackoverflow.com/a/7661829/5621827) for mac address and [this one](https://stackoverflow.com/a/1768219/5621827) for system name – jitender Jan 05 '18 at 05:15
  • https://stackoverflow.com/questions/19245571/how-to-get-the-client-system-mac-id-and-other-details-like-ip-address-etc – Hello Its Me Jan 05 '18 at 05:30
  • Sorry But its not working its give me server mac address . But i want clinet address please help – RAJKUMAR GLA Jan 05 '18 at 06:18

1 Answers1

0

Collecting client's mac address is not possible due to firewall, proxy, because ISP generic addresses are being given.

But you can grab the ip address using either

var remoteIpAddress = Request.UserHostAddress;

or using request's server variable collection

var remoteIpAddress = Request.ServerVariables("REMOTE_ADDR");

To get the computer name, use the below variable

var remoteMachineName = Request.ServerVariables("REMOTE_HOST");

But if you want to more details about how these values can be collected, you can visit the below article

http://www.dotnetfunda.com/forums/show/2088/how-to-get-mac-address-of-client-machine

Hope this helps.

Cinchoo
  • 6,088
  • 2
  • 19
  • 34