1. 在ASP.NET中专用属性:
字串9
获取服务器电脑名:Page.Server.ManchineName
获取用户信息:Page.User
字串2
获取客户端电脑名:Page.Request.UserHostName 字串1
获取客户端电脑IP:Page.Request.UserHostAddress
字串3
2. 在网络编程中的通用方法: 字串5
获取当前电脑名:static System.Net.Dns.GetHostName()
字串2
根据电脑名取出全部IP地址:static System.Net.Dns.Resolve(电脑名).AddressList 字串8
也可根据IP地址取出电脑名:static System.Net.Dns.Resolve(IP地址).HostName
字串5
3. 系统环境类的通用属性:
当前电脑名:static System.Environment.MachineName
当前电脑所属网域:static System.Environment.UserDomainName
当前电脑用户:static System.Environment.UserName 字串7