I am starting asp.net. Currently, I have a login page with a link button with a forgotten password at the bottom of the screen. I also use forms authentication to prevent unauthorized users from accessing other pages. Authentication seems to work just fine, except for one. This prevents the user from accessing the password recovery page when the user clicks the link button. How to allow all users access to login / password pages, as well as prevent others from viewing pages if they are not authenticated?
The code below is designed to prevent other anonymous views from accessing other pages. But I had no idea how to allow them access to the password recovery page ...
<authentication mode="Forms">
<forms loginUrl="/Presentation/Display/Login.aspx" name=".ASPNETAUTH" protection="All" path="/" timeout="120" cookieless="UseDeviceProfile" slidingExpiration="true"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
source
share