Custom route in module

Topics: Writing modules
Apr 1, 2014 at 8:10 PM
Edited Apr 1, 2014 at 8:12 PM
(I am currently using Orchard 1.6.1)

I have a custom module that creates a RouteDescriptor that has a URL that is defined as follows:
                new RouteDescriptor{
                    Route = new Route(
                        "{FirstParam}/{SecondParam}",
                        new RouteValueDictionary{
                            {"area", "SomeArea"},
                            {"controller","someController"},
                            {"action","SomeAction"}
                        },
                        new MvcRouteHandler()
                        )
                }
This route works fine but when using MultiTenancy, and defining a subtenant, it does not fire. When using the MultiTenancy however I can use the more conventional route of http://<host>/SomeArea/SomeController/SomeAction?FirstParam=TestFirst&SecondParam=TestSecond Can anyone enlighten me why there is different behaviour when using Multi tenancy and also why the route does not function when using this feature.

Many thanks as always.
Apr 2, 2014 at 8:36 AM
It would seem that I can fix this by prefixing the URL with some 'fixed' value. For example
                new RouteDescriptor{
                    Route = new Route(
                        "FixedValue/{FirstParam}/{SecondParam}",
                        new RouteValueDictionary{
                            {"area", "SomeArea"},
                            {"controller","someController"},
                            {"action","SomeAction"}
                        },
                        new MvcRouteHandler()
                        )
                }
I guess the question is now, why do I need to do this for a multi-tenant tenant and not for a default tenant?