How do I get the computer name in .NET c#
System.Environment.MachineName
from a console or WinForms app.HttpContext.Current.Server.MachineName
from a web appSystem.Net.Dns.GetHostName()
to get the FQDNSee 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