Yes, you can have two web.config files in web application.
In what scenarios will a project have two Web.configfiles ?
When developers develop application they divide project in to modules and many times these modules are hierarchically connected. For instance we are creating a web application for an organization which has departments.
We would like to divide our project source code in to modules as shown below. And every module will have their own configuration. Below is a simple web application project with two modules “Accounts” and “Sales”.
So let’s say if you are browsing “Home.aspx” from sales folder then “Web.config” file in the sales folder will get precedence. If the configuration is not found then it fall back to the “Web.config” file of the main directory.
Below is a nice video which demo’s how 2 web.config files can be in a project. This video is recorded by questpond which is takes C# and MVC trainings