title: How to get DNS aliases of specified host name?
body: <p>I am tying to get information about DNS aliases of specified host name.
  I used :</p>
  
  <pre><code>IPHostEntry hostEntry = Dns.GetHostEntry("hostname")
  </code></pre>
  
  <p>Unfortunately as mentioned in MSDN:</p>
  
  <blockquote>
    <p>The Aliases property of the IPHostEntry instance returned is not populated by this method and will always be empty.</p>
  </blockquote>
  
  <p>I plan to get DNS aliases such way:</p>
  
  <ol>
  <li><p>get ipAddresses of DNS server in registry <code>SYSTEM\CurrentControlSet\Services\Tcpip\Parameter</code>. </p></li>
  <li><p>use DNS WMI provider to get CNAME records in the DNS server. But in this case permissions for access to the DNS server are requiered. </p></li>
  </ol>
  
  <p>Is my plan correct?
  Is there another way to get CNAME records without permission to DNS server?</p>