I am developing an ASP.NET website. There are some pages on my sit that I want him to see only if he is a registered user. If not, he should be redirected to the appropriate page. Should I be checking this on the Page_load event that the user is logged in or not?
If the user types the name of the URL, this would still work, right?
Here is what I do for some of simplest websites. It uses typical forms authentication. From global.ascx.cs:
You explicitly specify pages that should be visible to all users and all other requests will be redirected to the login page. My web.config looks something like this: