I need to get the host name currently running the application. Any idea?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Something to bear in mind is that
System.Environment.MachineName;andSystem.Windows.Forms.SystemInformation.ComputerName;will give you the NETBIOS name of the machine (restricted to 15 characters).If you want the full TCP/IP based host name you can use
Dns.GetHostName():Or you can use:
Which will return the full computer name set during installation.