SubSonic Forums
All Your Database Are Belong To Us

External file containing <connectionStrings> config section

Latest post 10-24-2008 5:42 PM by papiores. 2 replies.
  • 10-24-2008 12:41 PM

    External file containing <connectionStrings> config section

    Is it possible to place <connectionStrings> settings in an external file from the web.config such that the Subsonic classes and the Subsonic Add-in to Visual Studio can access appropriately?

    I've tried unsuccessfully using the Enterprise Library Configuration Edit tool to specify an external file source, placing the <connectionStrings> section in that file.  I'm using Visual Studio Team System 2008 Development edition.

    I'm trying to achieve the same functionality as the <appSettings> section, which has a "file=" attribute that allows specifying an external file so Dev, UAT, and Production  app settings can be applied  by file name.  Unfortunately, the <connectionStrings> section does not allow the "file=" attribute.

    Any help or suggestions greatly appreciated.

     

  • 10-24-2008 1:51 PM In reply to

    Re: External file containing <connectionStrings> config section

    Reply |Contact |Answer

    Try this

    <connectionStrings configSource="connectionString.config" />

    If I am I because I am I, and You are You because You are You, then I am I, and you are you. But If I am I because You are You, and You are You because I am I, then I am not I and You are not You. -Rabbi of Kotzk

  • 10-24-2008 5:42 PM In reply to

    Re: External file containing <connectionStrings> config section

     Thanks!  That does what I need and Subsonic adjusted just fine and found the connection string!

     

Page 1 of 1 (3 items) | RSS