GenericPrincipal and web.config
Hi again.
I have created an Identity with the GenericPrincipal class (associated to the HttpContext.Current.User) to set an user and the roles he belongs to in an application in the global.asax AuthenticationRequest Event. The question is, Can I establish in the web.config file, using the <location> element or even in the <authorization> element those roles defined in my custom Identity to restrict the access to files and folders of the application or do I have to use the Method IsInRole("role") in all the files?
Thanks in advance.
Just reading we'll reach our goals.
__________________
Just reading we\'ll reach our goals.
|