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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top