Get the fully qualified domain name (FQDN) in .NET C#

June 5, 2010

tags: , ,
2 comments

I thought this might be useful in some cases so I decided to write about it.
This is how you can get the machine’s FQDN in C#:

Dns.GetHostEntry("localhost").HostName

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

2 comments

  1. BartlettAugust 7, 2012 ב 4:21

    You have some real insight into that the things you write about.
    I something like your writing style.

    Reply