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

link|improve this question

60% accept rate
feedback

3 Answers

up vote 1 down vote accepted

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

link|improve this answer
Great Code Snippet! I'm going to try it and if it doesn't work, try HttpCompress. I think this is exactly what I'm looking for though! – Atomiton Jun 18 '09 at 23:08
feedback

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.

link|improve this answer
Thanks! I will definitely Try this! – Atomiton Jun 18 '09 at 23:01
feedback

Did you try this way ? MS KB322603

To enable IIS 5.0 to compress .aspx pages, follow these steps:

  1. Open a command prompt.
  2. Type net stop iisadmin, and then press ENTER.
  3. Type cd C:\InetPub\adminscripts, and then press ENTER.
  4. Type the following, and then press ENTER: CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx"
  5. Type the following, and then press ENTER: CSCRIPT.EXE ADSUTIL.VBS SET W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions "asp" "dll" "exe" "aspx"
  6. Type net start w3svc, and then press ENTER.
link|improve this answer
That's basically what I'm doing, yes. That turns on file compression for IIS (I'm using IIS 6, btw) for those extensions for ALL sites. Other sites ARE working. Just the one that serves Extensionless URLs is not working – Atomiton Jun 10 '09 at 20:20
You may try this way. It worked on our IIS 6.0 – Mathieu Chateau Jun 10 '09 at 21:57
Thanks. I think it has to do with the extensions. IIS6 doesn't compress extensionless files, which is what routing is. – Atomiton Jun 18 '09 at 23:02
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.