title: Programmatically check if page requires authentication based on web.config settings
body: <p>I would like to know if there is a way to check if a page requies authentication based on the web.config settings. Basically if there is a node like this</p>
  
  <pre><code>  &lt;location path="account"&gt;
      &lt;system.web&gt;
        &lt;authorization&gt;
          &lt;deny users="?"/&gt;
        &lt;/authorization&gt;
      &lt;/system.web&gt;
    &lt;/location&gt;
  </code></pre>
  
  <p>then I would like to check on any page if it requires authentication or not and to  return true if it is under the account directory. Is this possible?</p>