Using different Web.config in development and production environment

前端 未结 10 2183
梦如初夏
梦如初夏 2020-11-22 12:50

I need to use different database connection string and SMTP server address in my ASP.NET application depending on it is run in development or production environment.

<
10条回答
  •  情深已故
    2020-11-22 13:35

    I'd like to know, too. This helps isolate the problem for me

    
    

    I then keep a connectionStrings.config as well as a "{host} connectionStrings.config". It's still a problem, but if you do this for sections that differ in the two environments, you can deploy and version the same web.config.

    (And I don't use VS, btw.)

提交回复
热议问题