c# - System.Configuration.ConfigurationManager.AppSettings not working -
below app.config file
<configuration> <appsettings> <add key="input_file" value="d:\bioen\web\newuser\dotnet\passwordgenerator\autopassword\autopassword\passwords.txt"/> <add key="location" value="sequals"/> </appsettings> </configuration>
when attempt read values in program shown below, both strings null. why this?
string path = system.configuration.configurationmanager.appsettings["input_file"]; string location = system.configuration.configurationmanager.appsettings["location"];
Comments
Post a Comment