Web Deployment

Last post 07-15-2008 11:13 AM by Carehalf. 4 replies.

Sort Posts:

  • Web Deployment

    07-08-2008, 5:40 PM
    • Loading...
    • Carehalf
    • Joined on 06-18-2007, 1:58 PM
    • Posts 46

    Okay, I just installed the Web Deployment Projects 2005.  I am trying to get it to change out the connection strings for me depending on if I want it to build Live or Debug version. There must be something I'm missing, not understanding or doing wrong. I added my website to a web deployment project. then in the deplo Property Pages under Deployment I selected Enable Web.config file section replacement. Next I typed in connectionStrings=Debug.config for my Debug configuration and connectionStrings=Live.config for my Release configuration.

    I created those files and all they have in them is the connectionStrings section the names of the pages are typed correctly, but when I try to test it I don't see it changing the Web.config file. I tried taking out connection strings from the Web.config file and get an error message saying it can't find the connection.  I tried debugging in Debug and release and keep getting the same connection string. I tried build site then open the config file to see if it is altered but it's not. I tried publishing the site but still no difference in the connection string.

     

    Any help is greatly appreciated.

     

    Josh 

  • Re: Web Deployment

    07-11-2008, 5:30 AM

    Hi,

    Please make sure you compile your Web Deployment project under corresponding build mode, for example, selecting Debug from Visual Studio configuration dropdownlist for Debug version of Web Deployment project.

    Please make sure that the .config files are in side of web.config file.

    You also can try to select "Use external configuration source file" to use configSource attribute to refer to external configuration source file.

    For more information, see http://msdn.microsoft.com/en-us/magazine/cc163448.aspx (Section: Pluggable Configuration Files).

     

    I hope this helps.

     

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Web Deployment

    07-11-2008, 11:32 AM
    • Loading...
    • Carehalf
    • Joined on 06-18-2007, 1:58 PM
    • Posts 46

    I have tried compiling under each build mode and always with the same result.

     I am not quite sure I understand the .config files are inside of web.config. How can one file contain another? I tried making it a folder to store my .config files, but then it said it didn't like that.

    I tried both with "Use external configuration source file" selected and not selected with the same results.

     I have read the article several times and still don't see what I'm doing differently.

     

    Thanks for the advice.

     

    Josh

  • Re: Web Deployment

    07-13-2008, 10:52 PM
    Answer

    Hi,

    Thanks for your response.

    Please make sure you put the .config files in the root of your website.

    When "Use external configuration source file" is enabled, the connectionstrings is replaced with the configSource instead of the connectionstring. For example:

    <connectionStrings configSource="debugconnectionstrings.config" />

     

    I hope this helps.

     

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Web Deployment

    07-15-2008, 11:13 AM
    • Loading...
    • Carehalf
    • Joined on 06-18-2007, 1:58 PM
    • Posts 46

    My config files are in the root folder of my website and if I understand what your saying about the "Use external configuration source file" then it should be enabled , which it is. Unfortunately there is no change. 

     Thanks for trying to help. I appreciate it.

     

    Josh

Page 1 of 1 (5 items)
Microsoft Communities
Page view counter