IIS 6 Compression - quickest and effective way to do it for ASP.NET compression
IIS 6 has builtin gzip compression ability which can compress
output of dynamic webpages (.aspx) and webservices (.asmx). The
compression is really good and can easily reduce 60% download time.
You should always turn this feature on in your production server.
The CPU usage is not that high compared to the reduction of
download time for users. Your users will love the significant
download time reduction when you turn it on.
Now, on internet you will find a lot of solutions. I tried all
of them which appears in first 30 Google search results. But failed
to make any of them work properly. Finally I was able to make it
work, but I realized you have to do it in a very specific way and
in specific order. Here it goes:
-
Go to IIS Manager from Administrative Tools
-
Right click on your computer name (not on websites or Default
Web Site)
-
Choose All Tasks-> Restart IIS
-
From the drop down, choose "Stop IIS" and click OK.
-
IIS is not stopped. Make sure it's not still running
-
Now go to C:\WINDOWS\SYSTEM32\INETSRV
-
Make a copy of the file Metabase.xml. This is a dangerous
file, don't play around with it. Make sure you have a backup before
you do what I am going to tell you now.
-
Open the metabase.xml in Notepad. Don't use any other editor
besides Notepad, Notepad2 or Visual Studio.
-
Find using "<IIsCompressionScheme"
-
You will find a match which looks like this:
"<IIsCompressionScheme Location
="/LM/W3SVC/Filters/Compression/deflate"
-
Now t
-
here are 2 nodes which are <IISCompressionsScheme> and
one node which is <IISCompressionsScheme
s
> Note: the 3rd one is plural.
-
Delete these nodes. After deleting you will see the next node
is "<IIsWebInfo Location ="/LM/W3SVC/Info"
Once you have deleted the 3 nodes, paste the text from this link in in their position:
Now start IIS and hit your site once. When it runs for the first
time, it will send uncompressed output, but it will compress it
behind the scene. So, next hit will give you the compressed
output.
Go to
www.pipeboost.com and enter
the URL to ensure you are getting compressed content. Before you do
so, make sure you have visited your site for a while in your local
browser so that the pages got the chance to get themselves
compressed.