diff --git a/src/shared/Jordnaer.Shared.Infrastructure/AzureAppConfigurationExtensions.cs b/src/shared/Jordnaer.Shared.Infrastructure/AzureAppConfigurationExtensions.cs index 9b3d8016..e42c09bf 100644 --- a/src/shared/Jordnaer.Shared.Infrastructure/AzureAppConfigurationExtensions.cs +++ b/src/shared/Jordnaer.Shared.Infrastructure/AzureAppConfigurationExtensions.cs @@ -16,9 +16,7 @@ public static WebApplicationBuilder AddAzureAppConfiguration(this WebApplication return builder; } - builder.Services.AddAzureAppConfiguration(); - // This is set by Azure Service Connector var connectionString = builder.Configuration.GetConnectionString("") ?? throw new InvalidOperationException( "Failed to find connection string to Azure App Configuration. " + @@ -33,6 +31,8 @@ public static WebApplicationBuilder AddAzureAppConfiguration(this WebApplication refreshOptions.Register("Sentinel", refreshAll: true)) .UseFeatureFlags()); + builder.Services.AddAzureAppConfiguration(); + return builder; } }