0

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

Robert_Junior
  • 1,122
  • 1
  • 18
  • 40
  • 2
    You can put the code is Application_AuthenticateRequest http://stackoverflow.com/questions/875472/authenticaterequest-event – Peyman May 28 '15 at 04:38

1 Answers1

1

you can create a class inherits from page class, and add your method there. then make all your pages inherits from the new class

Hussein Khalil
  • 1,395
  • 11
  • 29