Reputation: 682
Which one is the default configuration file in dotnet?
Web.config or machine.config or system.config.
Can anyone please tell?
Upvotes: 0
Views: 317
Reputation: 41549
.config files inherit (or override) each other in a hierarchy, usually with machine.config at the top defining the configuration machine wide. Then web.config at various levels through the file structure of your application.
See this msdn page for a discussion of the hierarchy:
http://msdn.microsoft.com/en-us/library/ms178685.aspx#scope_of_configuration_settings
If you were looking for the concept of a default there are two takes on this:
The config that sets the defaults for the machine that you're running on is machine.config.
The config that you would normally edit to make changes (ie by default) when working on something is the web.config in the root of your project/application - you don't generally make changes to machine.config unless absolutely necessary as it affects the operating environment for all other .net applications on the machine.
Upvotes: 2
Reputation: 8889
Each files are for different purpose, value is taken from both files, there is nothing called default file, Web.config is not mandatory file but Machine.cofig is Mandatory.b'coz it is a configuration file which is used to maintain the config details for all ASP.NET websites registered with in the web server
Upvotes: 0
Reputation: 4701
The *.config files have a scope. The web.config
is specific for the current application, whilst the machine.config
is for the machine etc.
So the answer to your question depends on the scope, for a specific web application, the 'default configuration' is the Web.Config.
The web.config file also 'inherits' some properties from the other 'parent' config files.
Upvotes: 0