c# - common web.config connectionstrings for different web applications? -


we have multiple web applications , deploy web applications in same folder called iapps. each app has own web.config file , must of have commmon connection strings.

now want make common configuration file application read connection strings , use it. how can that? articles or examples

current

\iapps\app1          |- web.config  \iapps\app2          |- web.config  \iapps\app3          |- web.config 

expecting

\iapps\app1    --web.cofig     |-root config <-| \iapps\app2    --web.cofig     |-root config  <-|    \iapps\app3    --web.cofig     |-root config  <-|      

this answer describes several alternatives. in addition, can leverage idea of inheritance placing common connection strings in web.config under root (i.e. iapps in case).

app1...appn inherit settings iapps\web.config

just careful anythinn define in iapps\web.config doesn't redefined in child apps' web.config, else you'll duplicate section defined error in child apps.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -