Request.ServerVariables["REMOTE_ADDR"] Request.ServerVariables["REMOTE_HOST"] Request.ServerVariables["REMOTE_USER"]
string hName = ""; System.Net.IPHostEntry host = new System.Net.IPHostEntry(); host = System.Net.Dns.GetHostEntry(HttpContext.Current.Request.ServerVariables["REMOTE_HOST"]); if (host.HostName.Contains(".")) { string[] sSplit = host.HostName.Split('.'); hName = sSplit[0].ToString(); } else { hName = host.HostName.ToString(); }
Shrotest Way to get Client PCName string clientPCName; string[] computer_name = System.Net.Dns.GetHostEntry( Request.ServerVariables["remote_host"]).HostName.Split(new Char[] { '.' }); clientPCName = computer_name[0].ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)