Explorar el Código

Fixed user profile path for config loading

Lukas Angerer hace 1 año
padre
commit
baacc47d64
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);
     }
 }