DNS.GetHostEntry when NetBIOS enabled at the NICs RRS feed

  • Question

  • We have been finding that when the DNS cache is empty, Dns.GetHostEntry(IP Address) can take up to about 9 seconds to return when NetBIOS over Tcpip is enabled on the NICs on Windows 10 & Windows 8.1. Wireshark shows that there is a reverse lookup query to the DNS server which returns with the correct hostname within a fraction of a second. There is then the delay of up to 9 seconds. There is then a forward lookup to DNS of the hostname which returns with the correct data in a fraction of a second. The hostname that GetHostEntry returns with is always the correct one. If NetBIOS over Tcpip is disabled on the NICs, then GetHostEntry returns with the correct hostname in a fraction of a second. We have tested this with a simple c# test program to isolate it from our legacy application. The problem occurs with both Visual Studio 2015 & 2005. Nslookup from the command line works pretty well instantly regardless of the NetBIOS NIC setting and the DNS cache. Dns.GetHostEntry is instantaneous once the DNS cache is populated.

    Observation showed that the long delay occurs when the machine corresponding to the IP Address is switched off. When this machine is switched on, we have seen from Wireshark, that NetBIOS queries seem to occur between the DNS reverse and forward lookups, the GetHostEntry delay is reduced to 1 to 2 seconds. However this is still significant for us in the terms of our legacy application which is compiling a list of hostnames on start-up.

    Is there any way thru the registry or whatever, of stopping Dns.GetHostEntry from doing NetBIOS stuff without having to disable NetBIOS at the NICs?
    Monday, February 18, 2019 3:53 PM

All replies

  • Hi mh4206,

    Thank you for posting here.

    Based on my search, I do not find a good to disable NetBIOS for Dns.GetHostEntry. If it is possible, please disable NetBIOS at the NICs like what you test before.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, February 19, 2019 6:39 AM