Visitar URL original
Azure Functions - PlatformNotSupportedException unless you mannauly set IPEndPoint · Issue #133 · MichaCo/DnsClient.NET · GitHub
Skip to content

Azure Functions - PlatformNotSupportedException unless you mannauly set IPEndPoint #133

Closed

Description

@msdickinson

Hi, so I have been able to run in azure functions about a year ago but now I am trying again and finding failing.

System.InvalidOperationException: 'Error resolving name servers'
PlatformNotSupportedException: Registry is not supported on this platform.

   var client = new LookupClient();
    

But the code below is functional. So again I assume this is in azure function not letting me grab the systems DNS settings, so I mannauly setting it works. Creating this here in case its useful for anyone but you can close the ticket.

   var client = new LookupClient(NameServer.GooglePublicDnsIPv6);
            var result = client.Query("google.com", QueryType.MX)
                                         .Answers.MxRecords().Any()
                                         ? ValidateEmailDomainResult.Vaild : ValidateEmailDomainResult.Invaild;

Activity

  1. MichaConrad commented on Oct 25, 2021

    @MichaConrad
    Collaborator

    Hi @msdickinson, thanks for letting me know!

    Never worked with Azure functions yet but I'll take a look into it. Its a bit strange because that path shouldn't run if it is not Windows.
    So that looks kinda like a bug

  2. added this to the 1.6.0 milestone on Jan 30, 2022
  3. added a commit that references this issue on Jan 30, 2022
  4. added a commit that references this issue on Jan 30, 2022
  5. MichaConrad commented on Jan 30, 2022

    @MichaConrad
    Collaborator

    This should be fixed with 1.6, I did not test it in azure functions though but the PlatformNotSupportedException should be ignored now.

    That doesn't mean that the library will find a DNS server in Azure Functions so you still might have to manually configure the client unless you can use public DNS servers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions