title: How does one connect to the RootDSE and/or retrieve NetBiosDomain Name with System.DirectoryServices.Protocols?
body: <p>In case of Directory Entry, one can connect and find the NetBios Domain name as follows :-</p>
  
  <p>private string GetNetbiosDomainName(string dnsDomainName)
          {
              string netbiosDomainName = string.Empty;</p>
  
  <pre><code>        DirectoryEntry rootDSE = new DirectoryEntry("LDAP://RootDSE");
  
          string configurationNamingContext = rootDSE.Properties["configurationNamingContext"][0].ToString();
  
          DirectoryEntry searchRoot = new DirectoryEntry("LDAP://cn=Partitions," + configurationNamingContext);
  
          DirectorySearcher searcher = new DirectorySearcher(searchRoot);
          //searcher.SearchScope = SearchScope.OneLevel;
          searcher.PropertiesToLoad.Add("netbiosname");
          searcher.Filter = string.Format("(&amp;(objectcategory=Crossref)(dnsRoot={0})(netBIOSName=*))", dnsDomainName);
  
          SearchResult result = searcher.FindOne();
  
          if (result != null)
          {
              netbiosDomainName = result.Properties["netbiosname"][0].ToString();
          }
  
          return netbiosDomainName;
      }
  </code></pre>
  
  <p>where dnsDomainName is a Fully qualified Domain name .</p>
  
  <p>However, in case of System.DirectoryServices.Protocols , How can one connect and find such NetBios Domain name when fully qualified domain name is given ? </p>