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:
include common connection strings in connection string config, , use application settings config app-specific connection strings.
as alternative, use custom configuration file app-specific connection strings , load in each app.
when build apps inject correct connection string keys config file using powershell. script can run post build task in build script.
otherwise, when package or stage release, ask release team run script manual step (or add deployment script).
Comments
Post a Comment