Hello everyone,
I'm trying to figure out how to prevent any page execution when a user is not authenticated, at least as early in the page lifecycle as possible. Here is my current setup (I'm doing manual authentication using .NET membership, and not relying on web.config user restriction).
I have the following page class inheritance:
BasePage --> SSLPage --> SecurePage
SSLPage handles certain SSL/https business rules. SecurePage being the class I inherit from in codebehind to check authentication (and all SecurePages, by nature, require SSL).
---
The problem I'm having, is that when I try to access a page that inherits from SecurePage, the inheriting Page_Load event gets fired. Even if I check for authentication in PreInit of SecurePage, the inheriting page's Page_Load events still get fired (for example, /Secure/UsersOnly.aspx's Page_Load event gets fired, even though in SecurePage I am doing a RedirectToLoginPage ...
Go to the complete details ...