Can I have multiple web.config files in a single web project?

后端 未结 3 1222
迷失自我
迷失自我 2020-12-08 07:08

I wanted to know that can I have 2 or more web.config files in my web project? If yes then how the compiler will check the connection string?

3条回答
  •  被撕碎了的回忆
    2020-12-08 07:59

    Yes you can have two web.config files in application. There are situations where your application is divided in to modules and for every module you need separate configuration.

    enter image description here

    For example if you have a application which has two modules lets say accounts and sales. You will create both these modules in a separate folder with each folder having separate config files.

    Please do watch this facebook video which explains the same in a very demonstrative manner. Click here to watch , why do we need 2 web.config files in a application

提交回复
热议问题