Dev and production web.configs

Discussion in 'ASP .Net' started by Andrew Morton, Jun 26, 2009.

  1. Is there some simple mechanism for having different web.config files for
    development and production environments? For example, on my dev server I use
    a different SMTP server from the production machines, so I store that in
    web.config and have another one I call web.deploy.config, then manually
    rename the latter when I upload it to the server.

    This is a bit of a nuisance as sometimes I forget to add/change a variable
    in one of the config files. Or if I've uploaded the files via robocopy,
    sometimes I forget to rename the web.deploy.config file. What do other
    people do to keep things tidy? (My google success seems to be low today.)

    (VS2008, developing on IIS6, deploying to IIS6 & 7.)

    Andrew
     
    Andrew Morton, Jun 26, 2009
    #1
    1. Advertisements

  2. I will investigate that. Thank you.

    Andrew
     
    Andrew Morton, Jun 30, 2009
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lucas Fletcher
    Replies:
    2
    Views:
    538
    John Saunders
    Jul 31, 2003
  2. Oleg Ogurok
    Replies:
    0
    Views:
    411
    Oleg Ogurok
    Jun 29, 2004
  3. darrel

    Do Web.Configs inherit each other?

    darrel, Dec 28, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    543
    darrel
    Dec 28, 2005
  4. RedHair
    Replies:
    4
    Views:
    876
    RedHair
    Nov 15, 2006
  5. dgk
    Replies:
    5
    Views:
    465
    sloan
    Mar 20, 2007
  6. Guest
    Replies:
    3
    Views:
    902
    Michael Nemtsev
    Jun 14, 2007
  7. Shelves

    Deploy To Dev and Production

    Shelves, Jul 17, 2007, in forum: Java
    Replies:
    4
    Views:
    662
  8. Guest
    Replies:
    2
    Views:
    312
    Bob Barrows [MVP]
    Sep 18, 2005
Loading...