Issue:
I have a webform app where every page is found with BasePage.cs, I have another class certifiedbasepage.cs, which is inherited from BasePage.cs
BasePage.cs has some code that suggests that a form authentication cookie is set, and if so , Then sets an IsAuthenticated Boolean flag and a MyAppUser object (property only, such as name, age, gender), means viewing each page on the site Awareness that if the page to view a user logs to be in or not, and read values MyAppUser if so.
The AuthenticatedBasePage Extra Facility, where no one attempts to browse the incoming page from this category, is not authenticated, they are redirected to the login page with the 'Retoureral' QuickString Variable set is.
I have said a similar setup to my MVC2 app for a fair bit of reading that I should not refer to HttpContext in my BaseController.cs (which inherits all my controllers), that means I can not test the unit. My first question is how can I make AcetyNatic and MyAppUser objects available on every page? Secondly, how can I create pages that only a certified user can access, and if they are not authenticated, they are redirected to the login page with the Retoureral QuickString Variable set?
Many thanks, A.
I am not using membership membership, I am only using the FormsEutification.Casebook method.
Comments
Post a Comment