So I discovered today UnknownActionHandlers are used to handled things like XForms posts and presumably other specific non declared actions on controllers which looks rather neat.
I realised that EPiServer.Web.Mvc.ActionControllerBase.HandleUnknownActions is doing a case senstive check on the unknown actions. Since actions are not normally handled case sensitively this seems like a bit of a bug.
I fixed it by overriding it in my page controller in this instance but not sure if anything else may be affected.
protectedoverridevoid HandleUnknownAction(string actionName)
{
foreach (var grouping in UnknownActionHandlers)
{
if (!string.Equals(grouping.Key, actionName, StringComparison.CurrentCultureIgnoreCase))
continue;
foreach (var unknownActionHandler in grouping)
{
var actionResult = unknownActionHandler.HandleAction(this);
if (actionResult ==null)
continue;
actionResult.ExecuteResult(ControllerContext);
return;
}
}
base.HandleUnknownAction(actionName);
}
So I discovered today UnknownActionHandlers are used to handled things like XForms posts and presumably other specific non declared actions on controllers which looks rather neat.
However I set all my routes to be lowercase:
This breaks things.
I realised that EPiServer.Web.Mvc.ActionControllerBase.HandleUnknownActions is doing a case senstive check on the unknown actions. Since actions are not normally handled case sensitively this seems like a bit of a bug.
I fixed it by overriding it in my page controller in this instance but not sure if anything else may be affected.