Skip to content

Azure Functions - PlatformNotSupportedException unless you mannauly set IPEndPoint #133

@msdickinson

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions