c# - Split 'appSettings' section in several web.config files -


i'm working on asp.net project , need add settings in appsettings section of web-app.

now these settings growing up, i'd organize them in different files. i've created other web.config files in different directories of application, adding this:

<?xml version="1.0"?> <configuration>   <system.web>   </system.web>   <appsettings>     <add key="settingkey" value="settingvalue" />   </appsettings> </configuration> 

but when try access them via configurationmanager.appsettings["settingkey"], null.

so, possible split settings in different files? there way logically organize app settings values?

you able see web.config settings within directory if executing path within directory.

so example: /mydirectory/web.config

is visible if loading page like: /mydirectory/mytestpage.aspx

you not see web.config settings here example: /otherdirectory/mytestpage.aspx

this post may help: creating custom .config file in asp.net


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -