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 badges2 Answers
Reset to default 0nslookup <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
版权声明:本文标题:c# - How to connect app running on VM to Azure Configuration - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736301487a1931193.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论