I have an ASP.NET site that uses a custom role provider to determine authorisation for different parts of the site. I have configured the authorised roles for different parts of the site in web.config.
If a user is not in a particular role, I'd like to be able to inform them which role they require to be able to access that part of the site, so that an accurate authorisation request can be generated and sent off for approval.
Is there a straightforward way of testing which roles can access a given page in the site?