Get Server Computer Name in C#

The situation is I have an existing C# web application (.NET 3.5) hosted on Windows Server 2003 on a company Intranet. I want to get the name of the computer on which the web application is hosted. This can be achieved by:

Environment.MachineName

Environment requires the System namespace.

Share and Enjoy:
  • Digg
  • DotNetKicks
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • Netvibes
  • Reddit
  • StumbleUpon
You can leave a response, or trackback from your own site.

One Response to “Get Server Computer Name in C#”

  1. dont know says:

    i can’t get it

Leave a Reply