For now I\'m stuck with IIS6 for ASP.NET-MVC (as in I cant upgrade to Server 2008 yet). It doesnt seem to know that my RESTful URLS are dynamic files and isn\'t compressing
Here's one option that seems to be working for me with MVC and IIS 6 using wildcard mappings and extensionless urls:
This is a workaround, but I'm stuck with Server 2003 and IIS 6 for the moment.
In a web config you should register StaticFileHandler and HTTP Module
<add verb="GET,HEAD,POST" path="*" type="[Web.Front.Modules].StaticFileHandler"/>
<add name="HttpCompressionModule" type="[Web.Front.Modules].HttpCompressionModule"/>
Source code you will find here
But do not forget to turn on compression on IIS
As HTTP compression for ASP.NET usually has been implemented using HttpModules since version 1.0, and HttpModules still belong to the ASP.NET request pipeline used by the MVC framework, you can still use a HttpModule to inject a GZIP or deflate response filter.
Here you can find a very nice, open-source, ready to ship implementation: HttpCompress by Ben Lowery (download at Google Code)
You just have to add a reference to the DLL, and add a few lines to your web.config. It already handles very exotic and rare cases and exceptions. You can add exclusions to your web.config, not based on file extensions (like in IIS6), but on mime type, which is probably exactly what you need.
I should add that I have actually running a ASP.NET MVC website on IIS6 using this library, so I can confirm that this works in practice.