Reputation: 1
I am using .net core 3 to create configuration setting in App configuration. I was able to create a key-value in the configuration explorer using the following code snippet and some additional configuration in the link below
var client = new ConfigurationClient(_configuration.GetConnectionString("AppConnectionString"));
var settingToCreate = new ConfigurationSetting(model.Key, model.Value);
client.SetConfigurationSetting(settingToCreate);
I am currently working on creating a feature flag in feature manager pane of App Configuration using the same approach but providing the contenttype for featureflag as below.
var client = new ConfigurationClient(_configuration.GetConnectionString("AppConnectionString"));
var settingToCreate = new ConfigurationSetting(model.Key, model.Value);
settingToCreate.ContentType = "application/vnd.microsoft.appconfig.ff+json;charset=utf-8";
client.SetConfigurationSetting(settingToCreate);
The issue is it creates a feature flag but without a name, showing an error message as below configuration explorer
Please suggest any possible solutions. Thanks in advance!
Upvotes: 0
Views: 861
Reputation: 1
I was able to implement the entire end-to-end scenario for feature flag management and usage. You can find the post here
Upvotes: 0
Reputation: 279
Please see this sample for managing feature flags with the .NET SDK for App Configuration.
Upvotes: 3
Reputation: 21838
I find you can add .appconfig.featureflag/new
by using Azure App Configuration client library for .NET
.
But you can't create .appconfig.featureflag/new
in configuration explorer on portal. You can check the image like below. You also can try in your side.
Upvotes: 0