Request.UserHostName 总是会给我用户的计算机名称吗?
基本上我想确保我始终会获得计算机的名称,而不是中间的任何代理或其他硬件。
Basically I want to make sure I will always get the computer's name rather than any proxy or other hardware imbetween.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你不能。
服务器了解的有关客户端的所有信息都只能通过浏览器提供的用户代理字符串来实现,因为用户可以更改用户代理字符串,而代理可能会删除或修改它,因此您不能对其做出任何假设。
No you cannot.
Everything the server knows about a client is only through the user agent string which the browser supplies, since users can change the user agent string and proxies may strip or modify it you cannot make any assumptions on it.
我认为这并不总是可能的。 如果用户使用匿名代理,您实际上无能为力。
I don't think that's always possible. If a user is using an anonymous proxy, there's really nothing you can do.