[英]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.