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
Make your ASP.NET application gzip its output itself with a method like this one.
Best thing to do is use HttpCompress by Bel Lowery. It's a simple, free and open source HttpModule handling the HTTP compression of your pages. You can use it in combination with the IIS Http Compression option.
I use HttpCompress in combination with Vici MVC and it works smooth!
I've been searching the net for hours and it was either use HttpCompress, buy a commercial project (Port80 Software has a solution) or write my own HttpModule.
PS: IIS does HTTP compression based on the file extension. That's why it's not working for websites using URL routing.
Did you try this way ? MS KB322603
To enable IIS 5.0 to compress .aspx pages, follow these steps:
Sorry to be that late on the discussion, but since I (still) have to enable IIS 6 compression on a MVC site, here is an IIS 6 native solution I have found: Include in compressed extensions
axd
. This suppose you have IIS 6 extension less URLs support from .Net framework 4 correctly enabled.I have done that directly in IIS Metabase. (As explained here;
%windir%\systems32\inetsrv\metabase.xml
. Prior to edit it, stop IIS or enable "metabase hot editing" in IIS, and backup it.)Extract from my configuration:
Rational: under the hood, extension less URLs work in IIS 6 by calling an
eurl.axd
page. See this blog for a more in depth explanation on extension less URLs in IIS6 with fx4.