diff --git a/Webzine.WebApplication/Program.cs b/Webzine.WebApplication/Program.cs index 64a7151..df814fa 100644 --- a/Webzine.WebApplication/Program.cs +++ b/Webzine.WebApplication/Program.cs @@ -19,8 +19,8 @@ try // Necessite le package Nuget Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation. .AddRazorRuntimeCompilation(); - builder.Services.AddSingleton(); - builder.Services.AddSingleton(); + builder.Services.AddScoped(); + builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); @@ -53,12 +53,12 @@ try } catch (Exception exception) { - // NLog: attrape les exceptions non gerees et les logge. + // NLog: attrape les exceptions non gerees et les logger. logger.Error(exception, "Stopped program because of exception"); throw; } finally { // Assure que NLog flush tous les messages de log avant de fermer l'application. - NLog.LogManager.Shutdown(); + LogManager.Shutdown(); }