in asp.net, I use this configuration section to strip anonymous users of all pages.
<authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="2880" /> </authentication> <authorization> <deny users="?" /> </authorization>
and I use the following to declare an exception that an anonymous user may call.
<location path="Welcome.aspx"> <system.web> <authorization> <allow users="*" /> </authorization> </system.web> </location>
which is great for me.
however, how can I set only the default page as an exception? (for example: anonymous can only access http: // mysite / , but canβt access other pages on the site?)
i'v tried to use location path = "~ /" or "/" and it does not work.
marstone
source share