Using a default action other than 'Index'?

Imported from the CodePlex archive for reference purposes. Support for MvcCodeRouting has ended.

Commented on
Is it possible to change the default action from 'Index'?

I see that the DefaultAction of the CodeRoutingSettings has been removed - is there another way to configure this?

Cheers,

Alex.
Commented on link
v1.1 has a DefaultAction attribute.
Commented on link
Thanks,

This solves my immediate problem.

I'd still like to see a global configuration for this so that it doesn't have to be set on each controller (also a problem when you have multiple non-'index' default actions differentiated only by its parameter signature).

Cheers,

Alex.
Commented on link
I plan to add a second convention, if there's no Index then look for and action with the same name as the controller. But that's for v2, since it's a breaking change. I don't see the need for a global configuration setting, what convention are you using?

Default actions cannot have required route parameters (either no parameters or all optional), so for overloaded actions use the one that satisfies that requirement.