I am creating an HttpModule in ASP.NET 2. The module needs to perform a different logic based on whether or not the requested path is public or protected. The web.config sets authorization with the <system.web><authorization> tag and several <location> tags.
Is there a way for the HttpModule to figure out if the path of the current request is protected or not? I don’t want to hard code the values in the code.
If your using standard
authentication/authorizationthen you can use CheckUrlAccessForPrincipal.