Asp – What’s the difference between ASP.Net MVC Routing and the new ASP.Net DynamicData Site routing

.net-3.5asp.net-dynamic-dataasp.net-mvcvisual-studio-2008

I've only started playing with both ASP.Net MVC and the new-to-VS2008 Dynamic Data Website Templates. I note that they both use routing in their URL handling, and I'm given to understand that because of routing, ASP.Net MVC won't work under IIS6. However my DynamicData site works just fine on IIS6.

I've had to temporarily abandon my exploration of ASP.Net MVC for an upcoming project due to the IIS7 requirement, and I'm wondering what the essential difference between the two is under the hood, i.e. what makes DynamicData sites work on IIS6 and MVC not?

Best Answer

ASP.NET MVC does indeed work under IIS6 (and IIS5 for that matter) as long as you enable wildcard mappings to ASP.NET. I have deployed MVC applications to production using IIS6, so I can guarantree that it's possible.

The key difference is that all URLs in DynamicData end in a file with an ASPX extension so, regardless of physical existance, the ASP.NET runtime is invoked (because ASPX is associated with ASP.NET), whereas most ASP.NET MVC requests to not have an extension (or have an MVC extension, which is not mapped by default) and thus IIS configuration is required before it will work.

IIS7 works automatically because IIS7 itself is managed and thus there is no separation between IIS/ASP.NET.