string name1 = Environment.MachineName; //returns webserver string name2 = System.Net.Dns.GetHostName(); //returns webserver string name3 = System.Windows.Forms.SystemInformation.ComputerName; //returns webserver string name4 = System.Environment.GetEnvironmentVariable("COMPUTERNAME").ToString();//returns webserver
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)