简体   繁体   English

Azure .Net 4.8 中的应用程序配置 LabelFilters 无法正常工作

[英]Azure App Configuration LabelFilters in .Net 4.8 Not working Correctly

I have several App Configuration Keys that are working correctly.我有几个正常工作的应用程序配置密钥。 Now one of them I need to have based on Environment so I am trying to use labels.现在我需要基于环境的其中一个,所以我正在尝试使用标签。 So I have 2 labels "Production" and "ProductionIntr.net".所以我有 2 个标签“Production”和“ProductionIntr.net”。

labelFiler=""

This brings back all the keys without labels.这会带回所有没有标签的键。

According to the documentation this should bring back all null and ProductionIntr.net根据文档,这应该带回所有 null 和 ProductionIntr.net

labelFilter="%00,ProductionIntranet"

This does not get any of the keys (Not the ones with labels or the null ones)这不会获得任何密钥(不是带有标签的密钥或 null 的密钥)

labelFilter="%00"

Neither does this.这也不行。

I am sure this is a simple syntax issue but I am racking my head and I cannot figure it out.我确信这是一个简单的语法问题,但我正在绞尽脑汁,但我无法弄清楚。 Any help would be greatly appreciated.任何帮助将不胜感激。

I got it to work.我让它工作了。 I am not sure it is the best solution but it works.我不确定这是最好的解决方案,但它确实有效。 I created 2 buulder stores and had the first with no labelFilter (AppSettingsStore) which gave me all the keys without any labels and then I created a second that had ProductionIntr.net as a filter(AppSettingsStoreIntraNet).我创建了 2 个 buulder 商店,第一个没有 labelFilter (AppSettingsStore),它给了我所有没有任何标签的键,然后我创建了第二个有 ProductionIntr.net 作为过滤器 (AppSettingsStoreIntraNet)。

Then I updated appsettings like this然后我像这样更新了应用程序设置

<appSettings configBuilders="Environment,AppSettingsStore,AppSettingsStoreIntraNet">

This might be making two calls to App Configuration.这可能是对 App Configuration 进行两次调用。 If someone knows how to do this in one ConfigBuilder please let me know.如果有人知道如何在一个 ConfigBuilder 中执行此操作,请告诉我。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Azure App Config 的 .NET 5 web 应用程序的动态配置不起作用 - Dynamic configuration for a .NET 5 web app using Azure App Config not working “InvalidOperationException: IDX20803: Unable to get configuration from: '[PII is hidden]'” 使用 Azure 应用程序服务 .NET 4.8 - "InvalidOperationException: IDX20803: Unable to obtain configuration from: '[PII is hidden]'" With Azure Application Services .NET 4.8 从 Azure 应用配置动态更新 .net 核心配置 - Dynamically update .net core config from Azure App Configuration 通过托管标识从 c# Azure 函数检索配置值的 Azure 应用程序配置不起作用 - Azure App Configuration to retrieve configuration values from c# Azure function via Managed Identity is not working Azure AD 在 WCF 服务中实现 .net 4.8 - Azure AD implementation in WCF service build in .net 4.8 WPF 热重载适用于 .NET 4.8 应用程序,但不适用于 .NET 6 - WPF Hot Reload works in .NET 4.8 app but not .NET 6 Log4net配置在生产Doe Azure Web服务中不起作用 - Log4net configuration is not working in production doe azure web services Azure 应用程序配置变量在 ASP.NET 的启动中不可用 - Azure App Configuration variables are not available in startup on ASP.NET .NET Core 2.2 - 无法从 Azure AppConfig 获取应用程序配置 - .NET Core 2.2 - Unable to get app configuration from Azure AppConfig 在 .NET 4.8 上的 ASP.NET MVC web 应用程序中安装 Bootstrap 5 - Installing Bootstrap 5 in ASP.NET MVC web app on .NET 4.8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM