Using different Web.config in development and production environment

前端 未结 10 2182
梦如初夏
梦如初夏 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:14

    The Enterprise Library configuration editor can help you do this. It allows you to create a base config file and then deltas for each environment. You can then merge the base config and the delta to create an environment-specific web.config. Take a look at the information here which takes you through it better than I can.

提交回复
热议问题