How many web.config files in Asp.Net?
You can have multiple configuration files in your asp.net project. There is no restriction to use the web.config file in the asp.net web application.
You can have 1 Web.config file per folder . So in your root you can have a web.config and in a subfolder you can have another one that overrides settings from the one in the root. If you have many folders and each folder have seperate web.config. then the files inside folder give first preference to the config files in the same folder.
The web.config files are used to set settings for a certain folder and its subfolders in a cascading way, ultimately overriding the default settings that can be found in the machine.config file. Generally a website contains a single Web.config file stored inside the application root directory . There are situations where your application is divided into modules and for every module you need separate configuration. However there can be many configuration files that manage settings at various levels within an application.