We are having problem overrriding settings in live environments because setting names with periods (".") are not supported (by Auzre App Service Configuration, Key Vault and CD pipeline task to transform appsetting.json). So, please cosider changing to use other delimiter like underscore ("_") please.
5 Answer(s)
-
0
1. Key Vault We put some credentials in Azure Key Vault and integrate with settings in the
appsettting.json. The secret names are set in following pattern for hirachycal settings.
Unfortunately, they do not support setting name with periods (".").

2. Azure App Service Configuration Normally, Azure App Service allow to override settings via app configuraiton. However, for App Service for Container we cannot do that if the setting name consist of periods (".").
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
hi @rachanee-mwp
You can create a custom
ConfigurationSettingValueProviderthen read settings viaunderscore name.public override void ConfigureServices(ServiceConfigurationContext context) { Configure<AbpSettingOptions>(options => { options.ValueProviders.InsertAfter(typeof(ConfigurationSettingValueProvider), typeof(MyConfigurationSettingValueProvider)); }); } public class MyConfigurationSettingValueProvider : ISettingValueProvider, ITransientDependency { public const string ConfigurationNamePrefix = "Settings:"; public const string ProviderName = "MC"; public string Name => ProviderName; protected IConfiguration Configuration { get; } public MyConfigurationSettingValueProvider(IConfiguration configuration) { Configuration = configuration; } public virtual Task<string> GetOrNullAsync(SettingDefinition setting) { return Task.FromResult(Configuration[ConfigurationNamePrefix + setting.Name.Replace(".", "_")]); } public Task<List<SettingValue>> GetAllAsync(SettingDefinition[] settings) { return Task.FromResult(settings.Select(x => new SettingValue(x.Name, Configuration[ConfigurationNamePrefix + x.Name.Replace(".", "_")])).ToList()); } }Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
1
@maliming, We do that as a workaround for now, but it would be better to have the those setting names from the framework itself because want to keep code (.cs and appsetting.json files) to be similar to the orginal version as much as possible for ease of code merging when doing upgrading.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

