From: http://blog.csdn.net/JL99000/archive/2008/04/09/2267705.aspx
1. Special attributes in ASP. NET:
Get server computer name: page. server. manchinename
Get user information: page. User
Obtain the client computer name: page. Request. userhostname
Obtain the Client IP Address: page. Request. userhostaddress
2. General methods in network programming:
Get the current computer name: static system. net. DNS. gethostname ()
Retrieve all IP addresses based on the computer name: static system. net. DNS. Resolve (computer name). Addresslist
You can also obtain the computer name static system. net. DNS. Resolve (IP address). hostname Based on the IP address.
3. General attributes of the system environment:
Current computer name: static system. environment. machinename
Domain Name of the current computer: static system. environment. userdomainname
Current computer user: static system. environment. Username