Browse Source

Fixed user profile path for config loading

Lukas Angerer 1 năm trước cách đây
mục cha
commit
baacc47d64
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);
     }
 }