IP to get the client computer name of code implementation

  • 2020-05-24 05:20:13
  • OfStack

In the company's domain environment, the request to obtain the client computer name, in fact, the original program started, only to obtain the client IP address later evolved into the request to display the client computer name. As a developer, you have to keep fulfilling your customers' requirements.

In fact, since IP got it, it is easy to get the name of the computer by IP:
 
System.Net.Dns.GetHostEntry("xxx.xxx.xxx.xxx").HostName 

Related articles: