0

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);

https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md#create-a-configuration-setting

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

feature manager

Please suggest any possible solutions. Thanks in advance!

3 Answers 3

3

Please see this sample for managing feature flags with the .NET SDK for App Configuration.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

enter image description here

So I think this is a problem with the library and there are no restrictions.

Comments

0

I was able to implement the entire end-to-end scenario for feature flag management and usage. You can find the post here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.