One of the great thing to handle dynamic website is to manipulate the output of the page by request. From writing handlers, modules or simply handling the Global.asax events. But just when you had that idea, something will discourage you to prevent using that idea and consider doing an even more tiring (and probably messy) way of doing.
To be able to handle static files in global.asax, we have to change something in the IIS. For 6 and below, it can be done on the server by checking the property of your website. On the application configuration (under home directory tab, click configuration button and the handler tab should be displayed), select a specific static file and click insert. Confirm that the "Verify that file exists" checkbox is NOT checked.
For IIS 7, this is a bit easier. Just be sure to have your application pool to be configured under "Integrated" pipeline and have these in the config file.
<system.webServer> <modules runAllManagedModulesForAllRequests="true" /> system.webServer>
After this, IIS should really handle all the request.