2
Reply

What is the use of web.config file in an ASP.NET apllication?

Jul 26, 2006
9k
0

    Web config plays vital role in web development. It actually stores all the configurations so that it can well handled and used repeatedly all over the application without repeatation.

    It actually stores values for database connection,Session states,Error Handling and security and these can be handled as developer wants to and wish to show the proper messages to user.

    Depending upon the web config file whole application works.

    January 04, 2007
    0

    web.config can appear in any directory on an ASP.NET Web application server. Each web.config file applies configuration settings to the directory it is located in and to all virtual child directories beneath it. Settings in child directories can optionally override or modify settings specified in parent directories. ASP.NET configures IIS to prevent direct browser access to web.config files to ensure that their values cannot become public (attempts to access them will cause ASP.NET to return 403: Access Forbidden). At run time ASP.NET uses these web.config configuration files to hierarchically compute a unique collection of settings for each incoming URL target request (these settings are calculated only once and then cached across subsequent requests; ASP.NET automatically watches for file changes and will invalidate the cache if any of the configuration files change).

    Ranjana Goel
    July 26, 2006
    0