Web服务器获取客户端的计算机的MAC地址 [英] web server to fetch client's machine mac address

查看:705
本文介绍了Web服务器获取客户端的计算机的MAC地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立一些复杂的东西为C#WinForm应用程序正在网上建立和试图在这里收集一些信息,并there.I've看,它可能获得的计算机的MAC地址在网络上使用网络无论是System.Net.NetworkInformation或System.Management.ManagementClass(我不能因为某些原因参考)。凡有我的担心


  1. 我的Web服务器联机可以知道一个与之相连的客户机的MAC地址是什么?

  2. 如果问题1是真的,我想它会使用IP(纠正我,如果我错了),如果客户端的机器是坐在后面的代理服务器或使用多个Web代理是什么?

  3. 如果问题1和2是正如何做到这一点从Web服务器。


解决方案

没有,有没有简单的方法来做到这一点。

MAC地址只能在同一子网解析 - 假设这不是一个相当小的企业内部网应用程序,你就不会在同一个子网您的客户。

在理论上,具有远程WMI查询客户将工作 - 但是防火墙和权限问题是不平凡的。同样,除非你能控制所有客户端 - 你不可能在这里有成功

关于你唯一可以做的事情是一个可下载的应用程序 - 可能的Flash,Silverlight的或ActiveX - 即询问本地机器给你。我不知道这会的信息由浏览器虽然被沙盒。

我的猜测是有一个更简单的方法做你想要做的 - 但你需要提供更多的细节的为什么的你要的MAC地址

I'm trying to build some complicated stuff for an C# winform application being build online and trying to gather some information here and there.I've looked on the web that it's possible to get a mac address of a computer on the network using either System.Net.NetworkInformation or System.Management.ManagementClass(which i can't reference for some reasons).Where are my worries

  1. Can my web server online know the mac address of a client's machine connected to it?
  2. If question 1 is true i guess it will use IP (correct me if I'm wrong) what if client's machine is sitting behind a proxy server or using multiple web proxy?
  3. if question 1 and 2 are positive How to do that from the web server.

解决方案

No, there's no easy way to do that.

The MAC address is only resolvable on the same subnet - assuming this isn't a fairly small intranet app, you would not be on the same subnet as your clients.

In theory, querying the client with remote WMI would work - but the firewall and permission issues are non-trivial. Again, unless you can control all clients - you're not likely to have success here.

About the only thing you could do is a downloadable app - possibly Flash, Silverlight or ActiveX - that interrogated the local machine for you. I'm not sure if that info would be sandboxed by the browser though.

My guess is there's an easier way to do what you're trying to do - but you'd need to provide more details on why you want the MAC address.

这篇关于Web服务器获取客户端的计算机的MAC地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆