Заблокировано Best practice for deploying code and web config files?

  • Thursday, July 10, 2008 1:45 AM
     
     
    (I'm not sure if this is the right forum, but I think you folks would know best regarding deployment of web apps.  Suggestions are welcome!)

    What is the best way to handle code and configuration in a web app, with regards to version control and deployment across environments?  (eg, dev/qa/prod)

    The different environments will need to connect to different servers (such as respective dev/qa/prod databases), and have various different settings that the app must be able to read and utilize.   So, the code versioning and deployment must be independent of configuration.   The configurations must also be version controlled and have their own promotion process.

    It seems like I could throw all this stuff into web.config files, but it looks like those are manipulated by Visual Studio;  does this mean that every time visual studio changes web.config, I need to re-merge environment-specific settings into the new web.config file?   That seems horribly dangerous;  test and production config settings should almost never change,  much less be fooled around with manually.

    How do I get around this issue?   It seems like VS only considers deployment to one environment ("publish").

All Replies

  • Thursday, July 10, 2008 3:28 AM
    Moderator
     
     
    I believe your question can be better answered in the Configuration and Deployment forum - Discussing Configuring and deploying ASP.NET applications - web.config, \bin, etc.

    Thanks!

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked As Answer by Doug8888 Thursday, July 10, 2008 4:17 PM
    • Unmarked As Answer by Doug8888 Thursday, July 10, 2008 4:19 PM
    •  
  • Thursday, July 10, 2008 4:19 PM
     
     
    Wait a minute.... that's a completely different website.   There's no forum appropriate for configuration/deployment MSDN?

    I thought this forum was the most appropriate because using VS and VSS together implies a process.    (Unless it is designed to automate or otherwise supplant process)
    • Edited by Doug8888 Thursday, July 10, 2008 4:29 PM reason 628
    • Edited by Doug8888 Thursday, July 10, 2008 4:43 PM reason 9992: because.
    •