John H.
John H.

Reputation: 1253

Forms based authentication

If I wanted to make sure that AUTHENTICATED users were denied access to Enroll.aspx and UNAUTHENTICATED users had access how should my "allow/deny users" tags be set in the web.config?

<location path="Enroll.aspx">
    <system.web>
      <authorization>
        <allow users = "?" />
        <deny users = "?" />
      </authorization>
    </system.web>
</location>

Upvotes: 3

Views: 241

Answers (2)

Biff MaGriff
Biff MaGriff

Reputation: 8241

<allow users="?" />
<deny users="*" />

Should do the trick

Upvotes: 2

Greg
Greg

Reputation: 16680

Did you try this?

<authorization>
<allow users = "?" />
<deny users = "*" />
</authorization> 

Allow anonymous users, deny everyone else.

Upvotes: 2

Related Questions