Click here to Skip to main content
16,013,440 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,
This question was asked for one of my friends
Q: suppose i have 2 web.config file,then which will be executed first.....
can any1 help...,

Thanks in advance
Posted

You can have multiple web.config files in an asp.net web application. The only thing is that there can be one at the root level and one each in various sub folders of the web application/site. The configurations defined in the sub folder config files will always overtake the root configurations.

Go through this article:
Working with more than one Web.config file[^]

Regards
Pawan
 
Share this answer
 
Comments
Manjunatha Shankar 5-Nov-12 4:12am    
Hi Pawan,
Thanks a lot..,
The one which is in the root directory will execute first.

Have a look for more info. 10-things-asp-net-developers-should-know-about-web-config-inheritance-and-overrides.aspx[^]
 
Share this answer
 
v2
Comments
Manjunatha Shankar 5-Nov-12 4:13am    
Hi Sushil,
Thanks a lot..,
Sushil Mate 5-Nov-12 4:14am    
welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900