Alex Rivera | Logout

ASP.NET MVC on IIS6

Asked 2008-08-29T08:45:19.673
25

Where can I find some good pointers on best practices for running ASP.NET MVC on IIS6?

I haven't seen any realistic options for web-hosts who provide IIS7-hosting yet. Mostly because I don't live in the U.S.

So I was wondering on how you best build applications in ASP.NET MVC and make it easily available to deploy on both IIS6 and IIS7. Keep in mind that this is for standard web-hosts, so there is no access to ISAPI-filters or special settings inside IIS6.

Are there anything else one should think about when developing ASP.NET MVC-applications to target IIS6? Any functions that doesn't work?

UPDATE: One of the bigger issues is the thing with routes. The pattern {controller}/{action} will work on IIS7, but not IIS6 which needs {controller}.mvc/{action}. So how do I make this transparent? Again, no ISAPI and no IIS-settings, please.

Edit
Report

1 Answer

4

As mentioned in this blog post by Phil Hack, it is possible to setup extension-less URLs for ASP.NET MVC in IIS 6 using wildcard application mappings:

  1. In IIS 6, go to the Application Configuration Properties for your ASP.NET MVC web application.
  2. Click "Insert..." in the Wildcard application maps section.
  3. Set the Executable to the path of the aspnet_isapi.dll (on my machine this is c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll).
  4. Make sure NOT to check the "Verify that file exists" and click "OK".

However as also mentioned by Hack, there are some performance implications of doing this.

answered 2009-06-21T07:05:00.007

Your Answer