title: ASP.NET Protecting Pictures Directory from Anonymous Users
body: <p>I'm sorry, I know very similar questions have been asked and answered, but I cannot protect a directory of pictures of my infant son from anonymous users.</p>
  
  <p>I have tried placing a web.config directly in the pictures directory:
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
      &lt;system.web&gt;
        &lt;authorization&gt;
          &lt;deny users="?"/&gt;
        &lt;/authorization&gt;
      &lt;/system.web&gt;
  &lt;/configuration&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have also tried using a location tag in the base web.config but that also does not appear to work.</p>
  
  <p>Either way I can still access /pics/ApplePicking.jpg when I run my project locally.  Thanks for any insight.</p>