我们可以唯一地标识ASP.net中的客户端吗? [英] can we uniquely identify a client in ASP.net

查看:85
本文介绍了我们可以唯一地标识ASP.net中的客户端吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有什么方法可以唯一地识别计算机.例如MAC地址或IP.我正在使用< b> C#,asp.net 3.5</b>.实际上,我有一个Web系统,在该系统中,我需要通过登录凭据和特定机器对用户进行身份验证.用户只能从注册计算机登录,而不能从所有计算机登录.

IP地址不是解决方案,因为在使用动态IP的情况下它可能每次都会更改

请帮助

Hi
is there any way to <b>uniquely identify a computer</b> like MAC Address, or IP. I am using <b>C#, asp.net 3.5</b>. Actually i have a web system where i need to authenticate a user through login credentials and for a particular machine. user can login from registed machine only he cannot login from all the machines.

IP address is not a solution because it may change every time in case of dynamic IP''s

please help

推荐答案

亲爱的朋友,

Dear Friend,

string[] computer_name = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName.Split(new Char[] { ''.'' });
            String ecn = System.Environment.MachineName;
            txtECN.Text = computer_name[0].ToString();



该链接将为您完成任务:-

http://forums.asp.net/t/821809.aspx/1 [ ^ ]

如果可以帮助您,请别忘了将此标记为您的答案.

谢谢



This link will do the thing for you:-

http://forums.asp.net/t/821809.aspx/1[^]

Don''t forget to mark this as your answer if it helps you out.

Thanks


这篇关于我们可以唯一地标识ASP.net中的客户端吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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