Getting HTTP Compression (GZip) to work with URL Routing on IIS 6

compressiongzipiis-6url-routing

I haven't seen any questions specifically addressing this specific issue.

When URL Routing is used, The Request goes into IIS and then is routed to the Aspx Page. For example, a site: www.site.com/products may route the request to wwwroot/inetpub/mysite/pages/productsPage.aspx

It's important to note that the page is ROUTED, not ReDirected.

Note that to get the URLs to work properly in IIS 6, a Wildcard extension has to be set up which routes all resources to Asp.Net (Asp.Net will then hand static resources back over)
This is documented here:
http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/

It would appear that IIS doesn't GZip the content when it sends it back. I have followed the instructions here:
http://www.kavinda.net/2007/02/17/how-to-enable-http-compression-iis6.html

to enable IIS 6 compression.

Any idea why Http Compression doesn't seem to work? It seems to work fine on other sites on my server. Just the one with URL Routing isn't working

Best Answer

Make your ASP.NET application gzip its output itself with a method like this one.