What is web.config. How many web.config files can be allowed
to use in an application?

Answer Posted / mohanraj

The ASP.NET Web.config file is used to define the
configuration settings for an ASP.NET application. ASP.NET
and the .NET Framework use .config files to define all
configuration options. The .config files, including the
ASP.NET Web.config file, are XML files.

Server-wide configuration settings for the .NET Framework
are defined in a file called Machine.config. The settings
in the Machine.config file can be changed and those
settings affect all .NET applications on the server.

Different ASP.NET applications might need different
application settings, that’s why defining those settings in
the Machine.config file, is usually not practical. The
solution for this problem is the ASP.NET Web.config file.

The ASP.NET application configuration settings can be
changed by creating a file called Web.config and saving it
in the root folder of the application. But what if the
Machine.config file defines different settings than the
ones defined in your Web.config file? The good news is that
the settings in the Web.config file override the settings
in the Machine.config file.
There can be more than one web.config file .

Is This Answer Correct ?    31 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I know asp.net mvc version? : Asp.Net MVC

506


What is & in a url?

533


What is http post action?

547


What do you mean by authentication?

528


Is asp.net web forms dead?

513






How many types of sessions in asp.net?

587


Can I stream live content/events?

581


What is difference between web api and web services?

537


List the asp.net validation controls?

527


What are url fragments?

508


Explain the difference between array and linkedlist?

524


Explain the use of errorprovider control in .net?

513


Can you use Web API with ASP.NET Web Form?

698


Is asp.net different from asp? If yes, explain how?

498


How do I use a proxy server when invoking a web service?

528