404 error on module controller action when running on IIS6

Topics: Customizing Orchard, Troubleshooting, Writing modules
Oct 3, 2011 at 8:00 PM

I've created a module containing a variety of internal business logic for my Orchard website, and it seems to work correctly on machines running IIS7. However, when I rollout the same module on a machine running IIS6, the actions on the controller don't seem to get picked up.

Here's some more detail. I've got a module called Alanta.Web.Corp, with a controller in it called RoutingGroupsController. This controller has, among other things, a method that looks like this:

public ActionResult Test()
	var test = new { FirstName = "Ken", LastName = "Smith" };
	return Json(test, JsonRequestBehavior.AllowGet);

On a machine running IIS7, this URL returns the appropriate JSON:


However, this URL, pointing to a machine running IIS6, returns a 404:


Is there something specific that I need to do to get these routes picked up on IIS6?

Oct 3, 2011 at 11:27 PM

For what it's worth, I've worked around the issue for the moment by adding a wildcard mapping for aspnet_isapi.dll (see http://blog.stevensanderson.com/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/). My understanding is that this wasn't supposed to be necessary in MVC3 (http://haacked.com/archive/2010/12/22/asp-net-mvc-3-extensionless-urls-on-iis-6.aspx), but I couldn't figure out any other way to make it work.

Dec 18, 2011 at 1:17 PM

I'm facing the same issue now, not for controllers only but also for any static resource like images and js-css files.

Can any one help here without using the iis-wildcard option?

Dec 18, 2011 at 3:17 PM

On my IIS6 hosting control panel there was a section where I could define extension mappings and it allowed me to use a wildcard, so make sure you have a look around all the options. Otherwise, there's simply no way as far as I know (well, you could attempt something very ugly by rewriting everything to *.aspx and then back again in a filter... whether that could be made to work I'm not sure)