locked
WEb Deployment project issue: How do i allow updates to Various sections in web.config in the target server as part of installation ? RRS feed

  • Question

  • User-1066121276 posted

    1) I've got  a web.config whose sections related to the application be it for SMTP settings and other sections related to the application should be editable while deploying it in the target web server

    2) I don't want to use 'Replace Config files' option

    Is there an existing MSBuild task that can be used to accomplish this?  Or do i have to roll-out a Window application and launch that as part of the task to get this done and put this in the one of the build phases be it "After Build" 

     

    3) Also, WebDeployment projects use the File System instead of the .csproj as we've plenty of projects, this results in an error as File System has files that are in .csproj.  was there a fix for this?

     

     

    Wednesday, May 23, 2007 1:36 PM

All replies

  • User-1092854931 posted

    You could just not copy the web.config to the remote host and have a different web.config there, this is how we do it at the moment.

    Maybe this tool can help you out a little bit, it got options to not deploy the web.config file etc.: http://www.sunlab.de/Tools.aspx

     

    Wednesday, May 23, 2007 2:52 PM
  • User-1066121276 posted

    1) We would like to give the person who deploys the application to change these settings for Production or Staging environment as part of the instllation itself.  As there are lot of sections in web.config that we would like to update for our application, we don't want to use this 'Replace Config file' option as this is compile time option

    2) Right now, we're looking at creating a Windows Application that'll edit the various nodes in web.config and this wil get kicked in the 'After Build' phase and then one can edit it.  This is the option i'm looking at right now,.

     If there's an easy way to do it, please let me know

     

     

    Wednesday, May 23, 2007 5:20 PM