Answered Questions

  • One application can have only one Web config file - true or false

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: Harit Pandya

    • Oct 10th, 2006


    An asp.net application is a virtual directory that you make on a web server. This application will take the settings of machine.config file if a web.config file is not available in that directory. Now if you create a sub directory inside a virtual directory and place another web.config file in the sub directory then the sub directory will take the settings of the web.config file in that particular directory.

    So my answer is that an application can have more than one web.config file but they should be in different directories of that web application and also the sub directory that uses it should be a virtual directory

    Shrikant B

    • May 18th, 2016

    One project can have multiple Web.Config files.

    Pratul Tripathi

    • Sep 2nd, 2015

    A project can have multiple web.config files, but at different levels. here different levels means at different folder or structure. In this case every page running uses the web.config file at its level/structure and if not found goes to its parent structure.