Have connection strings as well as common config source in asp.net or wcf websites -


hi looking solution have common connection strings have common connections strings file need specific add , remove connection strings in sites...but not see way it...

<configuration>   <connectionstrings configsource="connections.config">     <remove name="appconnectionstring" />     <add name="appconnectionstring" connectionstring="data source=(local);initial     catalog=xyz;integrated security=true;multipleactiveresultsets=true;" />   <connectionstrings/>  </configuration> 

with file connections.config containing

<connectionstrings>   <add name="name" connectionstring="conn_string" providername="system.data.sqlclient" />   <add name="name2" connectionstring="conn_string2" providername="system.data.sqlclient" /> </connectionstrings> 

thanks, bala

if not work have expressed above (which shame in opinon), have number of other options:

  1. include common connection strings in connection string config, , use application settings config app-specific connection strings.

  2. as alternative, use custom configuration file app-specific connection strings , load in each app.

  3. when build apps inject correct connection string keys config file using powershell. script can run post build task in build script.

  4. otherwise, when package or stage release, ask release team run script manual step (or add deployment script).


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -