I created a second web configuration and put it in a folder:
~ / Configuration / OtherConnections.config
My configuration file looks like this:
<?xml version="1.0"?> <configuration> <appSettings> <add key="serverurl" value="http://serverUrl" /> <add key="UserName" value="myUser" /> <add key="Password" value="XXXXXXX" /> </appSettings> </configuration>
When I try to read a value from one of the elements, for example:
string connectionInfo = ConfigurationManager.AppSettings["UserName"];
I do not get the value back. Is it because the web config is in a folder or is there something else in this web application?
rross source share