How to test asp.net location folder authorization programmatically
问题 I have an location element in my web.config like so: <location path="Admin"> <system.web> <authorization> <allow roles="Domain\Development"/> <deny users="*" /> </authorization> </system.web> </location> This works to only allow members of the development group access to this folder. I was wondering if there is a way to simply test if a user has access to this folder? One scenario is creating menu items. I'd simply like to hide or not render links to pages in this folder if the user does not