I want to use the route attribute defined in my C# files for create the xml site map (MVCSiteMap) file like this:
[RoutePrefix("{culture}/Registration/Person")]
public partial class PersonController : BaseController
{
[HttpPost]
[Route("Step1")]
public ActionResult StartStep1() {}
}
and create an xml file like this:
<mvcSiteMapNode title="Registration" controller="Person" action="Index" >
<mvcSiteMapNode title="Registration Person" route="Step1" controller="Person" action="Index" />
</mvcSiteMapNode>
But route attribute is ignored and the result was:
Additional information: A route named 'Step1' could not be found in the route collection.
My web.config file is configured like this:
<add key="MvcSiteMapProvider_IncludeRootNodeFromSiteMapFile" value="true" />
<add key="MvcSiteMapProvider_AttributesToIgnore" value="" />
<add key="MvcSiteMapProvider_CacheDuration" value="5" />
<add key="MvcSiteMapProvider_UseExternalDIContainer" value="false" />
<add key="MvcSiteMapProvider_ScanAssembliesForSiteMapNodes" value="true" />