title: Unloading parts of a web.config file from a child application
body: <p>We have a large content management system configured as the main site in IIS.  We also have a handful of independent applications that are configured as applications under IIS 7.5.  The issue that we’re running into is that the child applications are inheriting the web.config file from the parent application even though they are completely independent applications and share next to no configuration settings.  Ideally, we’d like to stop the child applications from inheriting the web.config file at all.  Is that possible?</p>
  
  <p>If not, we’d like to tell the child applications not to inherit parts of the master web.config file.  We’ve tried editing the child web.config files and adding  directives to the configuration file, but that doesn’t seem to be working.</p>
  
  <p>I understand that we can modify the parent web.config file to add in  directives to effectively restrict the inheritance; however we’re hesitant to do this because we’re not sure how that will impact the CMS.  The web.config file in question is also about 1000 lines long and we’re not sure how many changed we’d need to make.    We can, of course, move forward with this solution and test thoroughly, but I’d rather find one that doesn’t require modifying the parent application.</p>
  
  <p>We’ve also tried updating the child web.config files to manually remove certain elements of the parent web.config and we’ve had mixed results.  We can unload HTTP handlers and things like that, but we can’t seem to unload any of the references to the App_Code folder.</p>
  
  <p>In short, is it possible to have a child application NOT inherit any part of the web.config file?  If not, is it possible to overwrite or otherwise force the child to ignore settings in the parent web.config file?</p>
  
  <p>Thanks</p>
  
  <p>Dave</p>