DNS Server in App Service failure

Jorge E Arbelaez R 0 Reputation points
2024-01-30T13:58:15.4833333+00:00

I have an App Service app on Dotnet 7.0, but when it tries to access a network resource, it fails with error code 500. I wrote some snippets and found that this instructions fail : var host = "login.microsoftonline.com"; IPAddress[] addresslist = Dns.GetHostAddresses(host); The error message is: System.Net.Sockets.SocketException (11): Resource temporarily unavailable The resource group defines an internal VNet with the default DNS Server (Azure provided), that is being used by the App Service. We have not added nor deleted records from that server, which is entirely managed by Azure. ¿How can I re-create that DNS Server? ¿What alternatives can you suggest?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,932 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2024-01-31T10:23:51.93+00:00

    @Jorge E Arbelaez R Thanks for reaching here! To elaborate- The error message you provided indicates that the resource is temporarily unavailable and DNS resolution is failing, This could be due to a few reasons such as incorrect DNS configuration, network connectivity issues, or firewall restrictions.

    To troubleshoot the issue below steps could help-

    1. Check if the DNS server is configured correctly. Go to your App Service app, click on Networking, and then click on Configure VNet Integration. Check if the DNS server IP address is correct. see- https://learn.microsoft.com/en-us/azure/app-service/overview-name-resolution#configuring-dns-servers
    2. Check if there are any network connectivity issues. You can try to ping the resource from your App Service app console to see if it is reachable. If the ping fails, it could indicate a network connectivity issue. see- Configure virtual network integration
    3. Check if there are any firewall restrictions. You can check if there are any firewall rules that are blocking the traffic to the resource.

    Suggest you to refer this detailed blog- Improvements to DNS configuration and name resolution in App Service

    Please let us know for further query

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.