Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>How have you <a href="http://msdn.microsoft.com/en-us/library/8d82143t.aspx" rel="nofollow noreferrer">configured authorization</a>?</p> <p>Also, I assume you're not already authenticated in the parent site?</p> <p>In the admin subdirectory you should have something like the following in your web.config (obviously you may have more information in there as well):</p> <pre><code>&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> <p>This will deny all anonymous users, but allow all authenticated users access. You can easily extend this if you are using a Role Provider to only allow certain roles:</p> <pre><code> &lt;allow roles="Admin" /&gt; &lt;deny users="*" /&gt; </code></pre> <p>Note that you need the "Deny all users" in there, as the default behaviour is to allow all users. Authorization works "top down" in that it starts at the top of the list, and as soon as it finds a match, it stops processing, so if the user is in the "Admin" role, it will not get to the "Deny all users" rule.</p> <p>You can also configure this in the root web.config using a <a href="http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx" rel="nofollow noreferrer"><code>&lt;location&gt;</code> element</a>.</p> <p><strong>Responding to comments</strong></p> <p>And your authentication/authorization all works in the parent site?</p> <p>Could you edit your question to include (sanitised) web.config sections you've tried so we can see if there's anything obvious missing - for example, if you're using Roles to lock down the admin area, you have enabled it (<code>&lt;roleManager enabled="true"&gt;</code>, defaults to <code>false</code>).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload