Retreiving客户端的PC名称? (Windows验证) [英] Retreiving the PC Name of a Client? (Windows Auth)

查看:112
本文介绍了Retreiving客户端的PC名称? (Windows验证)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个内部网络上运行的应用程序ASP.net(实际上它是在2007年的Sharepoint运行)。

I have an ASP.net Application that runs on the internal network (well, actually it's running on Sharepoint 2007).

我只是想知道:结果
我能以某种方式获取客户端使用的是PC的名称?结果
我会访问Active Directory是否有帮助。结果
事情是,人们使用多台电脑,所以我不能使用任何手动/静态映射。

I just wonder:
Can I somehow retrieve the name of the PC the Client is using?
I would have access to Active Directory if that helps.
Thing is, people use multiple PCs, so I cannot use any manual/static mapping.

如果可能的话,我不希望使用任何客户端(阅读:JavaScript的)code,但如果它不能做服务器端,JavaScript的将是美好的,以及结果。
(ActiveX是绝对没问题的)

If possible, I do not want to use any client-side (read: JavaScript) code, but if it cannot be done server-side, JavaScript would be OK as well.
(ActiveX is absolutely out of question)

推荐答案

没有,只是返回IP: - (

No, that just returns the IP :-(

我刚刚找到它:

System.Net.Dns.GetHostEntry(Page.Request.UserHostAddress).HostName

这只是工作,如果确实有来解析名称,这是我的网络的情况下的DNS服务器。

That only works if there is actually a DNS Server to resolve the name, which is the case for my network.

这篇关于Retreiving客户端的PC名称? (Windows验证)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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