we.config files

Posted by Ppolisetty under ASP.NET on 7/20/2008 | Views : 2188 | Status : [Member] | Replies : 3
in which situation we have add more than one web.config files in an application...




Responses

Posted by: Raja on: 7/20/2008 [Member] Starter

Up
0
Down
First thing is you can't have more than one web.config file in a single folder. Generally an application level web.config file resides under the root folder of your application.

You can keep more than one web.config file in your application in different folder. Generally it is placed to secure that folder against anonymus (by placing authentication/authorization tag in the file) use or to keep folder specific settings.

Regards,
Raja, USA

Ppolisetty, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Majith on: 7/22/2008 [Member] Starter

Up
0
Down
I would like to share what I have understood about working with more than one Web.config file from my latest ASP.NET application. We planned to have different Web.config files for sub-folders in the application root folder. It helps us to have small and easily maintainable configuration files.

System wide configuration settings are defined in the Machine.config for the .NET Framework. The Machine.config file is located in the C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG folder. The settings defined in this file are applicable to all ASP.NET applications in that system.

We can override these default settings by including a Web.config file in the application's root folder.

By including Web.config files in sub-folders, we can override the settings defined in the Web.config file in the application's root folder.



Ppolisetty, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raja on: 7/22/2008 [Member] Starter

Up
0
Down
Very Good !!!. Your understanding is correct.

The path you have given for machine.config file is for ASP.NET Framework 1.1 version, for different version of ASP.NET Framework the "v1.1.4322" folder will change.

Thanks and keep it up!!!

Regards,
Raja, USA

Ppolisetty, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response