title: How do I programmatically list which ASP.Net Role can access a page?
body: <p>Is there a way of listing which roles have access to a given page via code?</p>
  
  <p>Example, I have a Testpage.aspx, and I wanted to list the roles allowed for this page when a user accesses the page. The URLAuthorizationManager must be able to find this out somehow, so there must be a way it knows what roles are configured in the webconfig for a page. or URL.</p>
  
  <p>Here is the webconfig limiting the roles allowed to view this page. </p>
  
  <pre><code>&lt;location path="Testpage.aspx"&gt;
      &lt;system.web&gt;
        &lt;authorization&gt;
          &lt;allow roles ="admin,sales" /&gt;
        &lt;/authorization&gt;
      &lt;/system.web&gt;
    &lt;/location&gt;
  </code></pre>
  
  <p>If I could find a solution, it would return "admin", "sales". Any one know how I can do this? Thanks</p>