Manage connection string dynamically?

  • Thread starter Thread starter Hillbilly
  • Start date Start date
H

Hillbilly

I've looked around and asking here for some insight but managing a SQL
Server connection string on the development machine and having to edit
web.config and dance the FTP rumba is getting aggravating.

One of the problems that seems to be confounding a solution is the use of
the same connection string name used throughout web.config to configure
providers and so on as that same connection string name has its value
declared in the <connectionStrings> section of web.config.

I've read a few strategies here and there but none mention the repetitive
use of the connection string name throughout the web.config. Your approach
has been what in this context?
 
<connectionStrings configSource="db.config"/>

You keep the local db.config so it is not published with the site and you
have the site's db.config file sitting there. You can then upload the site
without overwriting connection strings.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
 
Back
Top