So, I have web applications with these web applications:
<authorization> <deny users="?"/> </authorization> ... <location path="SomeUnsecuredPage.aspx"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location>
In other words, most pages require authentication and authorization, but some of them do not work.
Then I have an IHttpModule that will be used by all the various applications. All I want to do is check if the current request is really βprotectedβ. If the page does not require authorization, I do not want my IHttpModule to do anything at all. I use FormsAuthentication, and I assume that FormsAuthentication already has all this information cached somewhere, right? In addition, since this check will work continuously, so it should be very fast.
I am currently subscribing to HttpApplication.AuthorizeRequest, but surprisingly this event fires even for resources that allow anonymous access.
Any ideas? Thanks for reading!
internet man
source share