I have decorated several classes and methods in an
ASP.NET appliation with declarative security attributes
for roles. For example:
[System.Security .Permissions.Pr incipalPermissi on
(System.Securit y.Permissions.S ecurityAction.D emand ,
Role="SomeRole" )]
I currently use a Try...Finally block in calling code to
test a user's Role permissions. I would like to get away
from this and use a real logical construct.
How can I test for Role access with attributes and not
use Try...Finally?
Thanks.
Comment