Extension-less URLs on IIS6 with ASP.NET MVC

asp.net-mvciis-6url-routing

I remember attempting to use an extension-less URL format in a CMS I wrote way back when .NET 2.0 first came out. The problem was deploying to an IIS6 server. It made it practically impossible. I had to programmatically create folders for the path (tons of folders) and insert a dummy "Default.aspx" in there to get the request routed to ASP.NET. Of course, I hated that "solution" and had to abandon using extension-less URLs.

Now that I am getting started with ASP.NET MVC, I again want (need) to use extension-less URLs. Can somebody tell me if I am going to have the same headaches when I try to deploy my app to IIS6? Is anything special required to get this type of URL structure to work in IIS6?

Best Answer

Extension-less URLs are possible with IIS 6, but it requires setting up a "wildcard" ISAPI mapping in the site's Application Config. This has the downside of causing all requests to get processed by the ASP.NET ISAPI filter including static files like images, javascript, etc.

Here is an excellent blog post from Phil Haack about the different options for setting up ASP.NET MVC on IIS 6. The wildcard instructions are about halfway down.