How do I get the computer name in .NET c#
System.Environment.MachineName
HttpContext.Current.Server.MachineName
System.Net.Dns.GetHostName()
See How to find FQDN of local machine in C#/.NET ? if the last doesn't give you the FQDN and you need it.
See details about Difference between SystemInformation.ComputerName, Environment.MachineName, and Net.Dns.GetHostName
1.4m articles
1.4m replys
5 comments
57.0k users