about Web.config RRS feed

  • Question

  • can we have a web application without web.config file ? or can we have a  web application with more than one web.config file , if yes then what is the use of more than one web.config file in a single web application?
    • Moved by Karel ZikmundMicrosoft employee Thursday, September 17, 2009 10:46 PM Use (From:Building Development and Diagnostic Tools for .Net)
    Wednesday, September 16, 2009 5:15 AM

All replies

  • 1. We can have a web app running without web.config (read more form here).
    2. We can also have more than one web.config in one web app.
    3. The .NET app configuration hierarchy, there are at least two levels, the article shows how they works together.
        Level1: machine.config
                   You can found it under .net folder (e.g. "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG"), it is the default fonfiguration for all .net application on the target machine.
        Level2: web.config or app.config (for window app)
                   It is the configuration of application level, the config file should locate in your application's root folder, it can override the configuration of machine.config.
        Level3: other web.config
                   They should locate in the sub-folders in the application root folder.


    Please remember to mark helpful replies as answers and unmark them if they provide no help.
    Thursday, September 17, 2009 9:54 AM