title: How to disable Directory Browse in Web.Config
body: <p>I have a WebSite and I woud like <strong>Deny Directory Browser</strong> from a <strong>web.config file</strong>.</p>
  
  <p>Here the code I'm using placed in the ROOT.
  Does not work. I'm testing it Locally so with URL LIKE <a href="http://localhost:3214/">http://localhost:3214/</a> I can still browser the directory fro CMS.</p>
  
  <ul>
  <li>What I'm doing wrong?</li>
  <li>Should it work even on Local Machine?</li>
  </ul>
  
  <p>Thanks for your support!</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;location path="Cms"&gt;
      &lt;system.webServer&gt;
        &lt;directoryBrowse enabled="false" /&gt;
      &lt;/system.webServer&gt;
    &lt;/location&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Some resource:</p>
  
  <p><a href="http://blogs.iis.net/bills/archive/2008/03/24/how-to-enable-directory-browsing-with-iis7-web-config.aspx">http://blogs.iis.net/bills/archive/2008/03/24/how-to-enable-directory-browsing-with-iis7-web-config.aspx</a></p>
  
  <p><a href="http://www.expta.com/2008/03/configuring-virtual-directories-with.html">http://www.expta.com/2008/03/configuring-virtual-directories-with.html</a></p>