- Home ›
- Articles ›
- Enable HTTP Compression for your ASP.NET applications
Enable HTTP Compression for your ASP.NET applications
HTTP compression can add a quick performance boost to your web applications within minutes. If you would like to benefit from this free implementation of HTTP compression on Windows Server 2000 or 2003 under IIS5 or IIS6 this is the article for you.
- Download and install the HttpModule from http://www.blowery.org. Simply follow this link and download the binary package.
If for some reason you can't download it from Blowery.org try here
- Extract the package and copy the extracted files into the bin folder of your .Net application.
blowery.Web.HttpCompress.dll
blowery.Web.HttpCompress.dll.xml
ICSharpCode.SharpZipLib.dll
ICSharpCode.SharpZipLib.dll.xml
- Modify your Web.config
-
- Add to the configSections
<sectionGroup name="blowery.web">
<section name="httpCompress" type="blowery.Web.HttpCompress.SectionHandler, blowery.Web.HttpCompress"/>
</sectionGroup>
- Add to the httpModules section inside system.web (if httpModules section does not exist, create it)
<httpModules>
<add name="CompressionModule" type="blowery.Web.HttpCompress.HttpModule, blowery.web.HttpCompress"/>
</httpModules>
- Add to the configuration section
<blowery.web>
<httpCompress preferredAlgorithm="deflate" compressionLevel="high">
<excludedMimeTypes>
<add type="image/jpeg"/>
<add type="image/gif"/>
</excludedMimeTypes>
<excludedPaths></excludedPaths>
</httpCompress>
</blowery.web>
- That's it!
For more information or troubleshooting please refer to http://www.blowery.org
[Permalink] - Updated: Sunday, April 20, 2008