Просмотр исходного кода

Fixed user profile path for config loading

Lukas Angerer 1 год назад
Родитель
Сommit
baacc47d64
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      WebTemplate/AppServer.cs

+ 1 - 1
WebTemplate/AppServer.cs

@@ -61,6 +61,6 @@ public class AppServer
 
     private void SetupConfiguration(ConfigurationManager configuration, IWebHostEnvironment env)
     {
-        configuration.AddJsonFile($"~/{env.ApplicationName}.json", optional: true);
+        configuration.AddJsonFile($"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/{env.ApplicationName}.json", optional: true);
     }
 }