Ian Hayes

Ian Hayes

  • NA
  • 1
  • 7.5k

Class method authorization through configuration?

Oct 1 2010 12:47 PM

I'm a C# newbie.  
I am involved with a project that has a set of C# DLL's that act as a business tier.  These DLL's are called from some web service DLL's running under IIS.
We have a problem with determining how best to implement user authorization of class methods at the DLL level.  For example, there might be a 'CustomerManager' class in the C# DLL with an 'addCustomer' method.   We need to check that the originating user has the authorization rights to add a customer.  A similar authorization check is needed across around 50 classes with about 10 methods each, so I'm looking for a genericv way of implementing this beypnf injecting rights checking code into each method.
With my java background I'm used to configuring authorization either via service/bean config files or using aspect orientation to inject a pre method call interupt.
What options do I have with C#?