如何确定每个远程计算机与一个唯一的ID [英] How to identify each remote computer with a unique ID

查看:162
本文介绍了如何确定每个远程计算机与一个唯一的ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何确定一个远程计算机的唯一ID。

How do I identify a remote computer with a unique ID.

IP地址可能不是网络上它们共享IP不够独特。 MAC或其他硬件信息不可用或依赖于操作系统,体系结构,配置等。

IP address may not be unique enough on networks which share IP. MAC or other hardware information are not available or depend on OS, Architecture, configuration, etc.

Cookies是一种可能的解决方案。我可以删除我的浏览器的cookie,改变浏览器。此外,我必须阅读大量的信息(每个存储的cookie每个客户端)。在我的数据库中不存在任何关系。

Cookies are a possible solution. I could delete the cookies on my browser, to change the browser. Also I must read a lot of information (each client on each stored cookie). In my database does not exist any relation.

这可能是解决办法吗?

推荐答案

如果你想有一个永久的标识符,简单的答案是,你还没有一个。 MAC地址是不提供给你。这是提供给路由器,但它得到你的时候,它已经被扒掉(实际上,你和客户机之间的每个路由器取代它自己的MAC地址)。

If you want a permanent identifier, the short answer is that you don't have one. The MAC address isn't available to you. It's available to the router, but by the time it gets to you, it's been stripped off (actually, each router between you and the client machine replaces the MAC address with its own).

您已经有了IP地址(如果它是从一个私人的,非路由子网的或者如果请求被代理),你要做的是单一的IP地址重新presenting客户端子网。

You've got IP address (and if it's coming from a private, non-routable subnet or if the request is being proxied), all you've got is the single IP address representing the client subnet.

您可以获取会话ID,但:

You can get the session id, though:

HttpContext.Current.Session.SessionID

与的问题是,这是一个相当短暂的价值。你可以交替设置一个永久性的Cookie到期日期在遥远的将来。

The problem with that is that it's a fairly transient value. You could alternatively set a persistent cookie with an expiration date far in the future.

客户端系统,当然是免费的折腾饼干(或不接受)。

The client system, of course, is free to toss the cookie (or not to accept it).

这篇关于如何确定每个远程计算机与一个唯一的ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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