Reputation: 1123
I am assigned with the task of performing authorization in asp.net webforms. So I need to check if user is allowed to visit the page. So started like I stored users privileges in Db and upon login I fetch privileges also.
What is now done is in every page load I check if the page name is in privilege list. then I come across terms like handlers,modules,global.asax which are targets where I could write all these tasks.
Is this the right approach?
What should I choose> Gloabasl.asax or handler or module
Upvotes: 0
Views: 324
Reputation: 1401
you can create a class inherits from page class, and add your method there. then make all your pages inherits from the new class
Upvotes: 1