You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure App Configuration is a managed service that helps developers centralize their application configurations simply and securely. The .NET configuration provider library enables loading configuration from an Azure App Configuration store in a managed way. This client library adds additional functionality above the Azure SDK for .NET.
20
+
Azure App Configuration is a managed service that helps developers centralize their application configurations simply and securely. The .NET configuration provider library enables loading configuration from an Azure App Configuration store in a managed way. This client library adds additional [functionality](./configuration-provider-overview.md#feature-development-status) above the Azure SDK for .NET.
21
21
22
22
## Load configuration
23
23
24
+
The Azure App Configuration .NET configuration provider integrates with the .NET configuration system, making it easy to load configuration values from your Azure App Configuration store. You can add the provider during application startup and use it alongside other configuration sources.
25
+
26
+
To use .NET configuration provider, install the package:
Connect to your Azure App Configuration store by calling the `Connect` method on the `AzureAppConfigurationOptions`. The configuration provider follows a builder pattern, accepting an `Action<AzureAppConfigurationOptions>` delegate parameter that allows you to configure the provider.
33
+
34
+
### [Microsoft Entra ID](#tab/entra-id)
35
+
36
+
You use the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role.
You can create JSON key-values in App Configuration. For more information, go to [Use content type to store JSON key-values in App Configuration](./howto-leverage-json-content-type.md).
155
+
28
156
### Load specific key-values using selectors
29
157
30
-
### Trim prefix from keys
158
+
By default, the configuration provider will load all key-values with no label from the App Configuration. You can selectively load key-values from your App Configuration store by calling `Select` method on `AzureAppConfigurationOptions`.
// Load configuration values with prefix "TestApp:" and no label
165
+
.Select("App:Settings:*")
166
+
// Load configuration values with prefix "TestApp:" and "Prod" label
167
+
.Select("App:Settings:*", "Prod")
168
+
});
169
+
```
33
170
34
-
### Refresh on sentinel key (Legacy)
171
+
The `Select` method takes two parameters, the first parameter is a key filter that specifies which keys to load, and the second parameter is a label filter that specifies which key-values with specific labels to load.
35
172
36
-
## Feature flag
173
+
> [!NOTE]
174
+
> When multiple `Select` calls include overlapping keys, later calls take precedence over earlier ones.
37
175
38
-
##Configuration Setting Mapping
176
+
#### Key Filter
39
177
40
-
## Distributed tracing
178
+
The key filter parameter determines which configuration keys to include:
41
179
42
-
## Key Vault reference
180
+
-**Exact match**: Using a specific string will match only keys that exactly match the filter.
181
+
-**Prefix match**: Adding an asterisk (`*`) at the end creates a prefix filter (e.g., `App:Settings:*` loads all keys starting with "App:Settings:").
182
+
-**Multiple key selection**: Using a comma (`,`) allows selection of multiple explicit keys (e.g., `Key1,Key2,Key3`).
183
+
-**Reserved characters**: The characters asterisk (`*`), comma (`,`), and backslash (`\`) are reserved and must be escaped with a backslash when used in key names (e.g. the key filter `a\\b\,\*c*` returns all key-values whose key starts with `a\b,*c`.).
184
+
185
+
> [!NOTE]
186
+
> You cannot combine wildcard prefix matching with comma-separated filters in the same `Select` call. For example, `abc*,def` is not supported, but you can make separate `Select` calls with `abc*` and `def`.
187
+
188
+
#### Label Filter
189
+
190
+
The label filter parameter selects key-values with a specific label. If not specified, the built-in `LabelFilter.Null` will be used.
191
+
192
+
> [!NOTE]
193
+
> The characters asterisk (`*`) and comma (`,`), are not supported for label filter. Backslash (`\`) character is reserved and must be escaped using another backslash (`\`).
194
+
195
+
### Trim prefix from keys
43
196
44
-
## Snapshot
197
+
When loading configuration values with specific prefixes, you can use the `TrimKeyPrefix` method to remove those prefixes from the keys in your configuration. This creates cleaner configuration keys in your application while maintaining organization in your App Configuration store.
// Load configuration values with prefix "TestApp:" and trim the prefix
204
+
.Select("TestApp:*")
205
+
.TrimKeyPrefix("TestApp:");
206
+
});
207
+
```
47
208
48
-
## Geo-replication
209
+
For example, if your App Configuration store contains a key named `TestApp:Settings:Message`, it will be accessible in your application as `Settings:Message` after trimming the `TestApp:` prefix.
49
210
50
211
## Next steps
51
212
52
-
To learn how to use the .NET configuration provider, continue to the following tutorial.
213
+
To learn how to use the JavaScript configuration provider, continue to the following tutorial.
53
214
54
215
> [!div class="nextstepaction"]
55
-
> [Use dynamic configuration in JavaScript](./enable-dynamic-configuration-javascript.md)
216
+
> [Enable dynamic configuration in an ASP.NET web app](./enable-dynamic-configuration-aspnet-netfx.md)
Azure App Configuration is a managed service that helps developers centralize their application configurations simply and securely. The JavaScript configuration provider library enables loading configuration from an Azure App Configuration store in a managed way. This client library adds additional functionality above the Azure SDK for JavaScript.
20
+
Azure App Configuration is a managed service that helps developers centralize their application configurations simply and securely. The JavaScript configuration provider library enables loading configuration from an Azure App Configuration store in a managed way. This client library adds additional [functionality](./configuration-provider-overview.md#feature-development-status) above the Azure SDK for JavaScript.
0 commit comments