ASP.NET Configuration Files – Quick Questions

ASP.NET Configuration Files – Quick Questions

Question 1 :

Can a folder contain two web.config files directly under same folder ?

Answer 1 : 

No a folder cannot contain two web.config files directly under same folder . You can have one web.config under the folder and another web.configs under sub folders.

Question 2 :

What does machine.config contains ?

Answer 2 :

machine.config contains system wide configuration settings.

Question 3 :

What is the location of machine.config ?

Answer 3 :

machine.config can be located under C: /windows/Microsoft.NET/FrameworkNumber/Config folder where FrameworkNumber is framework number you are using whicn can be 1.1 or 2.0 or 3.5.

Question 4 :

How can you override  machine.config settings in your application?

Answer 4 :

You can override machine.config settings using web.config file at the your application root folder.

Question 5 :

How can you ovverride settings of web.config in parent or root folder ?

Answer 5 :

One can add more web.config file in subfolder and can override the setting of parent folder or root folder web.config file

Leave a Reply

Discover more from Abhyas

Subscribe now to keep reading and get access to the full archive.

Continue reading