【发布时间】:2012-03-29 10:29:11
【问题描述】:
为了获得计算机名称,我写了如下内容:
Dim client As System.Net.IPHostEntry
client = System.Net.Dns.GetHostByAddress(Request.ServerVariables.Item("REMOTE_HOST"))
label1.text=client.hostname
此代码在服务器机器上工作,但在客户端机器上它不工作。
有没有其他方法可以找到计算机名称。
【问题讨论】:
-
你得到什么错误?
Request.ServerVariables.Item("REMOTE_HOST")返回什么?