After installing Dasblog I had problems with the compression module of Ben Lowery.
In .NET 1.1 I had exactly the same problems. No output was generated to the browser.
I dissected his code and found that it could be greatly simplified, so i decided to rewrite it to a .NET 2.0 version.
The first thing that needed to be done was rewrite the configuration, next get rid of all the inherited streams that were there for no reason in my opinion but to add some headers to the stream. I decided to hook them, the headers, up after I was sure that everything was compressed ok.
In the blowery module you can provide paths in the web.config that need to be excluded and this works well as long as your app is running on a virtual directory and not on a website. If your page is www.foo.com/default2.aspx that needs to be excluded his parser returns efault2.aspx so I changed that to work properly as well.
I’ve provided a zip with this post that contains the module, which you can use freely as long as you leave the copyright notice intact. If you have any questions do not hesitate to ask.


If you have not you should consider providing your code/input to the dasblog development team!
This is brilliant.
I’ve been using 20 gyg per month and it’s been costing me a fortune.
I just benchmarked one page previously at 113k and now it is 18k.
Looks like I owe you a beer!
I used your HttpCompress module and it worked great until I tried to implement a file download like this:
If System.IO.File.Exists(CsvToDownload) Then
Response.Flush()
Response.WriteFile(CsvToDownload)
End If
This brings up the following exception:
Server cannot append header after HTTP headers have been sent.
this is in your code at:
app.Response.AppendHeader("Content-Encoding", "gzip");
if you have any suggestions please let me know.
Thank you very much
Gerhard
the download link doesn’t work anymore.
You can get the download from the codeproject article http://www.codeproject.com/KB/aspnet/HttpCompress.aspx