IIS 6.0 added a tremendous amount of features, one of which was compression. IIS 5 had compression but it lacked a lot. IIS 6.0 allows you to garnish some great performance gains (bandwidth) by using the following steps to turn on and tune compression.
The following steps I have put together are from both experience and also from many web posts and issues over the years.
1. Backup / Backup / Backup
a. Backup the metabase (start | run | inetmgr)
b. Right Click on the Root server (All Tasks | Backup / Restore Configuration)

c. Save the file (any name works) I typically use the Date (4_23_2007)
2. Create Compression Folder
a. I typically make this folder but you don’t have to, by default it uses a folder under the system32 folder.
b. I will be using (c:\compression) in this example
c. If you choose your own folder make sure the IUSR_YOURMACHINE has write permissions.
3. Add a Web Service Extension
a. In Inetmgr Select the Web Service Extensions area
b. Choose (Add a new Web Service Extension)

c. Name the extension: I use (compression)
d. Point the gzip.dll file (c:\windows\system32\inetsrv\gzip.dll)
e. Check the (Set extension status to Allowed)

4. To enable compression you can do this via 2 methods (1. Adsutil.vbs or 2. Direct editing the metadatabase) I prefer the adsutil method and will use that in these instructions. I find it easy to just use the adsutil.vbs script to do the dirty work and not miss type in the metabase.
ADStuil.vbs method
a. Open a command prompt
b. Change directory to (c:\inetpub\adminscripts)
c. run the following command for Dynamic compression
d. cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true
e. run the following command for static compression
f. cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true

5. Add more file types to be compressed. By default IIS will compress only the following in static mode (htm, html, txt). I prefer to add other extensions to both dynamic and static. For static I like to add (css, jss, xls, doc, ppt). For Dynamic depending on your release of windows and the files you would like to compress you will have to add (.aspx, and .asmx files). NOTE: I have never added .xml files to this list for fear of cache / compression locally.
a. Add (css, js, xls, doc, ppt) via the adsutil script
b. cscript adsutil.vbs SET W3SVC/Filters/Compression/Deflate/HcFileExtensions “htm html txt css js xls doc ppt”
c. cscript adsutil.vbs SET W3SVC/Filters/Compression/gzip/HcFileExtensions “htm html txt css js xls doc ppt”

d. Add to the server wide dynamic compression (NOTE: be careful with this. Test / use at your own risk) Performance when compressing dynamic content may cause your system to use high resources. There is a setting in the metabase for compression levels 1-10. I have heard that 10 causes performance issues, but 7-9 is ideal)
e. cscript adsutil.vbs SET W3SVC/Filters/Compression/Deflate/HcScriptFileExtensions “asp dll exe aspx asmx”
f. cscript adsutil.vbs SET W3SVC/Filters/Compression/gzip/HcScriptFileExtensions “asp dll exe aspx asmx”
6. Set your custom folder to hold the temporary compressed files
a. Open inetmgr and select the root (Web Sites)
b. Right click on web sites and select properties
c. From the properties window select the (Service) Tab
d. Enter / browse to your folder you created in step 2.
i. C:\compression
7. IISreset (you will need to do an iisreset to cause the above actions to take effect)
8. Test – I have used port 80 software or fiddler to test to see if compression is enabled correctly.
-
Fiddler – (http://www.fiddlertool.com/fiddler/)
-
Port 80 – Compression test (http://www.port80software.com/)
