Skip to content

Obviate.io

To anticipate and prevent

  • Home
  • About Us
  • History
  • Privacy Policy
  • Toggle search form

Howto: Enable Compression on IIS6.0

Posted on 2005-03-26 By Jon No Comments on Howto: Enable Compression on IIS6.0

Now there are alot of articles about how to enable compression on IIS 6.0, but I thought I’d write my own because I seem to be doign this more often — and forgetting how to everytime. I also find that using the UI is a bit iffy, sometimes I have the tab they want me to modify on screen, sometimes I dont (hell one server even told me the module running that tab was out of date, what ever). Hopefully these instructions should help you get along in setting this up (Note: I’m enabling compression on scripts like aspx for a webapp, I dont need compression on static content — But its XML and should be easy enough to figure out).

First things first, open management console, open IIS, open “Web Site Extensions”. Right click, “Add a new Webservice Extention”. Extension name can be what ever, I use “HTTP/Gzip Compression”. Click Add. Put in: C:\WINDOWS\system32\inetsrv\gzip.dll. Ok. Ok. Click on the name of that extension you just added, click “Allow” on the left side.

Next section, right click on IIS, click properties. Select “Enable Direct Metabase Edit”. Hit Apply, Ok.

Time to edit the metabase.xml file, as usual back your sh$t up before you do this. Open the metabase.xml file: c:\WINDOWS\system32\metabase.xml — Search for ‘<IISCompressionScheme’ — Below I’ve included the important section from my metabase file with bold indicating modified or added files:

<IIsCompressionScheme   Location ="/LM/W3SVC/Filters/Compression/deflate"
        HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
        HcCreateFlags="0"
     HcDoDynamicCompression="TRUE"
        HcDoOnDemandCompression="TRUE"
        HcDoStaticCompression="FALSE"
     HcDynamicCompressionLevel="8"
        HcFileExtensions="htm
            html
            txt"
        HcOnDemandCompLevel="9"
        HcPriority="1"
        HcScriptFileExtensions="asp
            dll
            exe
         aspx"
    >
</IIsCompressionScheme>
<IIsCompressionScheme    Location ="/LM/W3SVC/Filters/Compression/gzip"
        HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
        HcCreateFlags="1"
     HcDoDynamicCompression="TRUE"
        HcDoOnDemandCompression="TRUE"
        HcDoStaticCompression="FALSE"
     HcDynamicCompressionLevel="8"
        HcFileExtensions="htm
            html
            txt"
        HcOnDemandCompLevel="9"
        HcPriority="1"
        HcScriptFileExtensions="asp
            dll
            exe
         aspx"
    >
</IIsCompressionScheme>
<IIsCompressionSchemes   Location ="/LM/W3SVC/Filters/Compression/Parameters"
        HcCacheControlHeader="max-age=86400"
        HcCompressionBufferSize="8192"
        HcCompressionDirectory="%windir%\IIS Temporary Compressed Files"
        HcDoDiskSpaceLimiting="FALSE"
     HcDoDynamicCompression="TRUE"
        HcDoOnDemandCompression="TRUE"
        HcDoStaticCompression="FALSE"
        HcExpiresHeader="Wed, 01 Jan 1997 12:00:00 GMT"
        HcFilesDeletedPerDiskFree="256"
        HcIoBufferSize="8192"
        HcMaxDiskSpaceUsage="100000000"
        HcMaxQueueLength="1000"
        HcMinFileSizeForComp="1"
        HcNoCompressionForHttp10="TRUE"
        HcNoCompressionForProxies="TRUE"
        HcNoCompressionForRange="FALSE"
        HcSendCacheHeaders="FALSE"
    >
</IIsCompressionSchemes>

Restart IIS — And you should be set.

Windows

Post navigation

Previous Post: Phishing is fun!
Next Post: Blogger

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

March 2005
S M T W T F S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« Feb   Apr »

Copyright © 2022 Obviate.io

Powered by PressBook Premium theme