admin管理员组

文章数量:1122846

I'm having trouble getting my app to connect to an Azure Configuration (AC) I setup for the app. Here are some details regarding the issue:

  • The app is hosted on an Azure virtual machine (VM) in a different subscription.
  • I am attempting to connect to the AC like in the below code, which is basically how the Microsoft documentation shows.
var builder = new ConfigurationBuilder();
builder.AddAzureAppConfiguration(appConfigConnstring);
Config = builder.Build();
  • This works fine when I run my app on localhost, I am able to connect and retrieve values from the AC. It does not work when running from the app server.
  • The error message I get is "The provider timed out while attempting to load."

I've searched online for more info on this but can't seem to find any forum or documentation regarding this scenario, so any help is much appreciated.

I'm having trouble getting my app to connect to an Azure Configuration (AC) I setup for the app. Here are some details regarding the issue:

  • The app is hosted on an Azure virtual machine (VM) in a different subscription.
  • I am attempting to connect to the AC like in the below code, which is basically how the Microsoft documentation shows.
var builder = new ConfigurationBuilder();
builder.AddAzureAppConfiguration(appConfigConnstring);
Config = builder.Build();
  • This works fine when I run my app on localhost, I am able to connect and retrieve values from the AC. It does not work when running from the app server.
  • The error message I get is "The provider timed out while attempting to load."

I've searched online for more info on this but can't seem to find any forum or documentation regarding this scenario, so any help is much appreciated.

Share Improve this question asked Nov 22, 2024 at 18:50 SendETHToThisAddressSendETHToThisAddress 3,6848 gold badges38 silver badges60 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

nslookup <your-azure-config-endpoint>.azconfig.io run this command inside your VM to check the connectivity to your service endpoint. If it is fail you need to check your DNS settings. And check your Virtual machine NSG rules whether it blocking your request or not.

This turned out to be an issue with not having a private endpoint. Once I added a private endpoint to the Azure Configuration it worked.

This can be done through infrastructure as code (IaC) if you have code for it, or if not it can be done in the Azure portal by going to the Configuration, then from the left side menu access Settings >Networking >Private Access, then click the "+ Create" button to add a private end point.

本文标签: cHow to connect app running on VM to Azure ConfigurationStack Overflow