title: How to stop inheritance of <configSections>in Web.Config
body: <p>You simply cannot use <code>&lt;location path="." inheritInChildApplications="false"&gt;</code> in certain parts of your web.config in order to tell it to ignore inheritance of certain sections (you'll get errors such as 'inheritInChildApplications attribute is not declared' and so fourth if you try putting it in sections where it's not supported).  </p>
  
  <p>For example you can't use it before or inside <code>&lt;configSections&gt;</code>.  You can for example wrap your <code>&lt;system.web&gt;</code> tag in the location tag but I need to stop inheritance of anything in <code>&lt;configSections&gt;</code> and I do not see a way to do this.</p>
  
  <p>My sub application is inheriting some of the same config settings that my parent app's web config has in <strong>IIS 7</strong> in the tree.  I see no way to put a <code>&lt;clear/&gt;</code> either in the configSecion tag as it's an invalid tag if you try to add it there.</p>
  
  <p>How do you tell it to ignore that section?</p>