No such host is known. (kv-env-app.vault.azure.net:443)

Nayanajith 1 Reputation point
2022-04-20T18:44:04.293+00:00

My web application is deployed to azure "App service" via azure DevOps and the solution was built using .NET 5.

I am using "Azure.Security.KeyVaults.Secrets (4.2.0)" to connect to the Key Vault.

But last 48 hours I am getting the following issue
"with physical root 'C:\home\site\wwwroot\' hit unexpected managed exception, exception code = '0xe0434352'. First 30KB characters of captured stdout and stderr logs: Unhandled exception. System.Net.Http.HttpRequestException: No such host is known. (keyValutUri:443) --->"

I have checked the App service "Identity" and the key vault "Access policies" too. Both are configured. What could be the reason.

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,113 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AmanpreetSingh-MSFT 56,306 Reputation points
    2022-04-21T04:50:24.627+00:00

    Hi @Nayanajith • Thank you for reaching out.

    Based on the error, the application is not able to connect to the Key Vault named kv-env-app.vault.azure.net. To make sure that a Key Vault with this name actually exists, I tried to create a new Key Vault with the same name in my subscription expecting that to fail, as the name must be unique across all the subscriptions in Azure.

    However, the name was successfully getting validated as it is available for use:

    194907-image.png

    If the name is already assigned to a Key Vault by someone in Azure, it should result in the below error:

    194983-image.png

    So, I would suggest you check if the Key Vault with that name still exists or is deleted by someone. If it is deleted, try creating a new one with the same name so that you don't have to update the application code.

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.