IHttpHandler

I was trying to create an HttpHandler to filter ALL incoming requests for my application, regardless of the file type or subdirectory. In my web.config file I added this

<httpHandlers>
<add
verb="*"
path="*"
type="Interceptor,Interceptor"
/>
</httpHandlers>

It doesn't work... UNLESS you add the extension mapping of:

.*

in IIS for the application settings.

Is there a way to do this without the mapping in IIS? Why doesn't the web.config entry override the IIS settings? Not a huge deal being it works with the additional setting, but the web.config entry should override. And subdirectory web.config files could be used to override the main directory settings. What does a path of "*" mean if not everything?

[893 byte] By [SlavaKozlov] at [2008-2-25]
# 1
I guess Global.asax is the way to intercept the requests by handling the range of page life cycle events.
BadriNarayanan at 2007-8-30 > top of Msdn Tech,Feedback for forums and MSDN websites,Off-Topic Posts (Do Not Post Here)...
# 2

I guess you can accomplish this by implementing an IHttpModule and configuring it in the <httpModules> element in web.config. Another way is to handle the various events (BeginRequest, Authenticate etc) in the Global.asax

HTH

BadriNarayanan at 2007-8-30 > top of Msdn Tech,Feedback for forums and MSDN websites,Off-Topic Posts (Do Not Post Here)...