Click here to Skip to main content
13,357,773 members (60,877 online)
Click here to Skip to main content
Add your own
alternative version


26 bookmarked
Posted 19 Nov 2008

Enable Gzip compression in IIS 6.0 for ASP.NET 2.0 websites

, 19 Nov 2008
Rate this:
Please Sign up or sign in to vote.
How to enable Gzip compression in IIS6.0 for ASP.NET 2.0 websites.


This step by step guide will show you how to enable Gzip compression to work with ASP.NET 2.0. Compressing the output should make your websites faster, especially when being viewed via a slow connection.

Step 1: Enable Compression Using the IIS Manager

Expand IIS Manager. Right click on Websites. Click Properties. Click the Service tab. Check the boxes to enable compression.

Step 2: Install IIS 6.0 Resource Kit Tools

You can download the free tool from Microsoft here.

Step 3: Edit IIS Meta Database

Open the IIS Metabase Explorer. It is part of the resource kit you just installed. Expand LM>W3SVC>Filters>Compression. You will need to edit both gzip and deflate. Find the item with the name HcScriptFileExtensions. Add the values aspx, axd, asmx, and css. Repeat process for gzip and deflate. Find HcDynamicCompressionLevel and set it to something higher than 0.

Step 3: Do IISReset

That's it. To verify that you have everything working correctly, you can use the free tool YSlow for Fire Bug.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
United States United States

You may also be interested in...

Comments and Discussions

QuestionFollowed instructions but didn't work for me Pin
Member 1122750812-Nov-14 2:21
memberMember 1122750812-Nov-14 2:21 
QuestionI couldn't find the properties Pin
Rao Mukesh16-Sep-14 21:42
memberRao Mukesh16-Sep-14 21:42 
GeneralDid not work for me. Pin
melihkemal11-Dec-09 4:57
membermelihkemal11-Dec-09 4:57 
GeneralRe: Did not work for me. Pin
ToddHileHoffer11-Dec-09 5:05
memberToddHileHoffer11-Dec-09 5:05 
GeneralRe: Did not work for me. Pin
melihkemal11-Dec-09 5:53
membermelihkemal11-Dec-09 5:53 
GeneralRe: Did not work for me. Pin
ToddHileHoffer11-Dec-09 5:10
memberToddHileHoffer11-Dec-09 5:10 
You are right, it is not compressing .css. Yslow is giving my sites a B for gzip compression. Everything is compressed except the css. I don't know what to do about that. Sorry.

I didn't get any requirements for the signature

GeneralRe: Did not work for me. Pin
melihkemal11-Dec-09 5:56
membermelihkemal11-Dec-09 5:56 
GeneralRe: Did not work for me. Pin
ToddHileHoffer11-Dec-09 6:11
memberToddHileHoffer11-Dec-09 6:11 
QuestionAny reason why compression may not work? Pin
Member 33745557-May-09 9:27
memberMember 33745557-May-09 9:27 
GeneralIIS is Gzipping all files including GIF Pin
JRev9-Jan-09 5:01
memberJRev9-Jan-09 5:01 
GeneralRe: IIS is Gzipping all files including GIF Pin
Claus Conrad30-Jan-09 11:11
memberClaus Conrad30-Jan-09 11:11 
GeneralRe: IIS is Gzipping all files including GIF Pin
JRev3-Feb-09 8:42
memberJRev3-Feb-09 8:42 
QuestionYSlow Pin
amrelgarhy8119-Nov-08 9:44
memberamrelgarhy8119-Nov-08 9:44 
AnswerRe: YSlow Pin
ToddHileHoffer19-Nov-08 12:56
memberToddHileHoffer19-Nov-08 12:56 
QuestionRe: YSlow Pin
amrelgarhy8119-Nov-08 22:42
memberamrelgarhy8119-Nov-08 22:42 
AnswerRe: YSlow Pin
ToddHileHoffer20-Nov-08 3:11
memberToddHileHoffer20-Nov-08 3:11 
QuestionNo Service tab Pin
Andre Luiz V Sanches19-Nov-08 7:07
memberAndre Luiz V Sanches19-Nov-08 7:07 
AnswerRe: No Service tab Pin
ToddHileHoffer19-Nov-08 7:15
memberToddHileHoffer19-Nov-08 7:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180111.1 | Last Updated 19 Nov 2008
Article Copyright 2008 by ToddHileHoffer
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid