I'm trying to write an IIS extension that modifies the response HTML for a request as it is sent back to the client. I know that traditionally this would be the work of an ISAPI filter however I'm a .Net developer and I've read that implementing an ISAPI filter in .Net is a bad idea.
I have read in a few places that the shiny new integrated pipeline mode of IIS 7 should now allow me to writes modules in .Net that provide the same functionality as ISAPI filters by implementing IHttpModule, however I can't work out how to modify the response HTML for non ASP.Net requests.
The only resource I have found on how I might do this is this article however this doesn't appear to work for non ASP.Net resources or in cases where HttpApplication.CompleteRequest
is called, even if the integrated pipeline mode is enabled.
How can I write an IIS module in C# that allows me to modify the response html / data for all requests?
I think you would have to route all your requests through the ASP.NET module.