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>
<allow users="?" />
<deny users="*" />
Should do the trick
Did you try this?
<authorization>
<allow users = "?" />
<deny users = "*" />
</authorization>
Allow anonymous users, deny everyone else.
精彩评论