Groups > Asp .Net > HttpHandlers and HttpModules > Re: HttpModule processing static files




HttpModule processing static files

HttpModule processing static files
Tue, 26 Feb 2008 09:17:09 +000
Hi, I am debugging some HttpModules using Visual Studio and notice that one of
them seems to be processing static files, such as css and gifs. Some of the
other HttpModules are not processing these files.
 
Ostensibly the HttpModules seem to be setup the same way. They are registered in
web.config the same way and they all handle the AcquireRequestState.

 
What's going on?
Post Reply
Re: HttpModule processing static files
Wed, 19 Mar 2008 02:17:28 +000
I'm assuming you are seeing this happen while debugging your code using Visual
Studio and the ASP.NET Development Server. Every request that comes in to the
ASP.NET Development Server is handled by ASP.NET and that's why your HttpModule
is being called even for .css and .gif files. The HttpModules you have that
aren't processing .css and .gif files must have a check coded in them to not
handle these files.

In IIS, all registered HttpModules in the web.config will be involved when
processing every file request that comes into the server for files that are
mapped to be handled by ASP.NET. By default, IIS is not set to handle non
ASP.NET files (such as css, gif and jpeg); but you can set that up manually if
you would like.

Hope this helps clarify things.
Post Reply
about | contact