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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -