I am creating a web application - access is via login and the username and password validated against sql server db. What I want to know is how to "protect" pages being directly accessed - in php and asp I normally create a session variable eg isLoggedIn in the login script and set it to true and include a single line in each php / asp page in the application- that redirects user to the login page if they try to access a page without logging in first. Is this a reasonable way to proceed with .NET or is there something better?
Any help much appreciated.
Any help much appreciated.