I'm trying to do something seemingly simple: ensure that Application_BeginRequest is called for every static *.JS URL sent to my IIS6 website, whether or not the underlying file exists.
What's a good way to do this on IIS6 & ASP.NET 3.5, ideally without causing all static files to go through ASP.NET-- only the .JS URLs?
If you're curious about why, I'm working with an existing app that uses Application_BeginRequest to do custom redirection and path rewriting. It woudln't have been my first choice to implement it this way, but given what's there I want to extend it to cover .JS too, instead of including another different redirection/rewrite method (e.g. IIS redirection configuration, a rewrite module, etc.) which may complicate deployments and testing of the app, especially on IIS6.
I know the IIS7 story here is much, much better (esp. around XCOPY deployment of configuration, modules, etc.), but I can't upgrade this app right now.