当任何人在浏览器中输入网站名称时,获取MAC地址 [英] Get MAC address when any one enter website name in the browser

查看:63
本文介绍了当任何人在浏览器中输入网站名称时,获取MAC地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人在浏览器中输入网站名称时如何获取MAC地址.

how to Get MAC address when any one enter website name in the browser.

推荐答案

请参阅网址,

我需要使用asp的客户端计算机的MAC地址.净 [ ^ ]


如何获取客户端计算机的Mac地址在asp.net [ ^ ]
Refer the urls,

i need MAC Address of client machine using asp.net[^]


How to get Mac Address of Client Machine in asp.net[^]


引用此线程
http: //stackoverflow.com/questions/1356962/如何获取访客的pc-in-asp-net-webapp-mac-address-of-visitors-pc [> http://stackoverflow.com/questions/1342738/get-the- mac-of-asp-net-website-user [ ^ ]
refer this threads
http://stackoverflow.com/questions/1356962/how-to-get-the-mac-address-of-the-visitors-pc-in-an-asp-net-webapp[^]
http://stackoverflow.com/questions/1342738/get-the-mac-of-asp-net-website-user[^]


尝试一下此代码,在其中找到一些地方
Try this code, got some where
public static string GetClientIPAddress(System.Web.HttpRequest httpRequest)

{

    string OriginalIP = string.Empty;

    string RemoteIP = string.Empty;

    OriginalIP = httpRequest.ServerVariables["HTTP_X_FORWARDED_FOR"]; //original IP will be updated by Proxy/Load Balancer.

    RemoteIP = httpRequest.ServerVariables["REMOTE_ADDR"]; //Proxy/Load Balancer IP or original IP if no proxy was used

    if (OriginalIP != null && OriginalIP.Trim().Length > 0)

    {
        return OriginalIP + "(" + RemoteIP + ")"; //Lets return both the IPs.

    }
    return RemoteIP;

}


这篇关于当任何人在浏览器中输入网站名称时,获取MAC地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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