title: Web.config implications of clearing sections?
body: <p>I've come across code like this:</p>
  
  <pre><code>    &lt;modules&gt;
          &lt;remove name="ScriptModule"/&gt;
          &lt;remove name="YafTaskModule"/&gt;
          &lt;remove name="UrlRewriter"/&gt;
  
          &lt;add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
          &lt;add name="YafTaskModule" type="YAF.Core.YafTaskModule, YAF.Core" preCondition="managedHandler"/&gt;
          &lt;add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" preCondition="managedHandler"/&gt;
      &lt;/modules&gt;
  </code></pre>
  
  <p>And it sometimes breaks, for example if your parent AppDomain doesn't have an UrlRewriter module in it, an error is raised.</p>
  
  <p>How unsafe is it to use:</p>
  
  <pre><code>    &lt;modules&gt;
          &lt;clear/&gt;
  
          &lt;add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
          &lt;add name="YafTaskModule" type="YAF.Core.YafTaskModule, YAF.Core" preCondition="managedHandler"/&gt;
          &lt;add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" preCondition="managedHandler"/&gt;
      &lt;/modules&gt;
  </code></pre>
  
  <p>Same happens in <code>&lt;httpModules&gt;</code> and a few other tags</p>