diff --git a/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Extensions/ProgramConfigurationAndDependencyInjection.cs b/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Extensions/ProgramConfigurationAndDependencyInjection.cs index b52d8b39..e231641a 100644 --- a/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Extensions/ProgramConfigurationAndDependencyInjection.cs +++ b/bff/src/Altinn.Authentication.UI/Altinn.Authentication.UI/Extensions/ProgramConfigurationAndDependencyInjection.cs @@ -131,15 +131,15 @@ public static IServiceCollection AddIntegrationLayer(this IServiceCollection ser //Providers and supporting services if (isDevelopment) { - services.AddSingleton(); + services.AddTransient(); } else { - services.AddSingleton(); + services.AddTransient(); } - services.AddSingleton(); - services.AddSingleton(); + services.AddTransient(); + services.AddTransient(); //Clients for the actual Features' Services @@ -147,6 +147,7 @@ public static IServiceCollection AddIntegrationLayer(this IServiceCollection ser services.AddHttpClient(); services.AddHttpClient(); services.AddHttpClient(); + services.AddHttpClient(); return services; } @@ -160,13 +161,13 @@ public static IServiceCollection AddIntegrationLayer(this IServiceCollection ser public static IServiceCollection AddCoreServices(this IServiceCollection services) { //Services for the login user and auth logic - services.AddSingleton(); - services.AddSingleton(); + services.AddTransient(); + services.AddTransient(); //Altinn actual Features' Services - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); services.AddHttpClient(); services.AddHttpClient(); services.AddHttpClient();