location tag and seperate config file

  • Thread starter Thread starter AMP
  • Start date Start date
A

AMP

Hello,
What is the difference between having a "location" Tag in web.config
and having a web.config file in a seperate folder? I read that there
is a major difference, but no explanation.
Thanks
 
Hello,
What is the difference between having a "location" Tag in web.config
and having a  web.config file in a seperate folder? I read that there
is a major difference, but no explanation.
Thanks

There is no difference, because ASP.NET used hierarchal configuration
that allows inheritance of configuration settings. Separate web.config
helps to clarify what location is setup for the current directory.

Note, that there is allowOverride attribute which can prevent
configuration settings from being changed by web.config files in child
directories.

example (in root web.config)

<configuration>
<location allowOverride="false"/>
</configuration>

Hope this helps
 
Back
Top