none
DNS Resolution failure only on Windows 2012 R2 RRS feed

  • Question

  • I've encountered a very bizarre bug that I've narrowed down to a specific scenario but due to potential impact I need to try and find out why. 

    Application A v 1.0 built for `.NET 4.7.2` runs fine on `Windows Server 2012 R2`
    Application A v 2.0 also built for `.NET 4.7.2` but now using a `.Net Standard 2.0` shared library suddenly causes the tcp stack to fail (specifically all DNS resolution fails, even internal destinations) 

    This bug only occurs on `2012 R2`. `2016` works just fine. 
    This bug occurs even if only the assembly for the shared library is included, no actual instances declared or references made, not even a using statement, just having the shared library in the dependencies causes this. 

    Outside of the application DNS resolution works fine. 
    FusionLogs are functionally identical between what gets loaded on my `Windows 10 machine` and what gets loaded on `2012 R2`. Only difference being the encoded folder names for the native images loaded.

    Here's a list of all relevant dependencies from the shared library
    ```
    BouncyCastle.Crypto v 1.8.5:
        Org.BouncyCastle.Crypto.Parameters;
        Org.BouncyCastle.OpenSsl;
        Org.BouncyCastle.Security;
    Common.Logging v 3.4.1:
    DnsClient v 1.2.0:
    Microsoft.CSharp v 4.7.0:
    Mimekit v 2.4.1:
    NewtonSoft.Json v 12.0.1:
    System v 4.0.0.0:
        System.Collections.Generic;
        System.Collections.Concurrent;
        System.IO;
        System.IO.Compression.FileSystem;
        System.Drawing;
        System.Numerics;
        System.Runtime.Serialization;
        System.Net;
        System.Net.Http;
        System.Net.Http.Headers;
        System.Security.Cryptography;
        System.Text;
        System.Threading;
        System.Threading.Tasks;
        System.Xml;

    ```

    Exception:
    ```
    17:16:21 [1] [Info] - DNS Query against 'google.com'

    Unhandled Exception: System.Net.Sockets.SocketException: No such host is known
       at System.Net.Dns.GetAddrInfo(String name)
       at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
       at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
       at DNSAPITestApp.Tester..ctor() in ...
       at DNSAPITestApp.Program.Main(String[] args) in ...
    ```

    I've searched extensively online however there's just too much white noise of similar DNS issues that still having nothing to do with this specific scenario or why this could be happening (and just as importantly how to confirm any theories).

    Any help would be greatly appreciated. I can't post much of the code but if there are any specific areas where a particular dependency is used that anyone would like to see I can add snippets. 
    Tuesday, January 21, 2020 3:33 PM

Answers

All replies

  • Development issues are better addressed somewhere on MSDN, possibly over here.

    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?forum=windowsgeneraldevelopmentissues

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Tuesday, January 21, 2020 3:38 PM
  • Thank you for the reply! I've replicated this post at the location you suggested. 
    Tuesday, January 21, 2020 5:03 PM
  • Sounds good, you're welcome.

     

    (please don't forget to mark helpful replies as answer)

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Tuesday, January 21, 2020 7:04 PM
  • Hi,

    You could mark the useful reply as answer if you want to end this thread up.

    If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,

    Allan


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, January 22, 2020 2:47 AM