Author: DuSDong get a computer name in .NET, IP address, user name, and the current is very simple, the following is my favorite of several ways, if there are other good ways we can respond to finishing with:
1. Private properties in ASP.NET: Get server name: Page.Server.manchinename Get User Information: Page.Request.userHostname Get Client Computer IP: Page.Request.userHostaddress 2 . General method in network program: Get the current computer name: static system.net.dns.getHostName () Remove all IP addresses according to the computer name: static system.net.dns.resolve (computer name) .Addresslist can also be based on IP Address Remove the computer name: static system.net.dns.resolve (IP address). HostName 3. Universal Properties for system environment: Current computer name: static system.environment.Machinename current computer belongs: static system.environment.userdomainName Current computer user: static system.environment.username