Forms Authentication used to redirect to the login page when a folder was configured to restrict authentication to a user did that. As configured in the web.config
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
Which would redirect you to the login page with the returnurl of where you wanted to go in the first place.
Now when I try to access a page that requires me to be logged in I see a YSOD saying
An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.
The authorization works when I moved to Identity 2.0 Beta1 prerelease but there is no redirect to the login page and I'm not able to make this happen though Ive gone through quite a bit on Identity.
...
Go to the complete details ...