我现在面临使用MvcSiteMapProvider与ASP NET MVC 5.MvcSiteMapProvider没有显示面包屑链接和路线
有时候这个问题,当应用程序被部署(使用释放模式),面包屑链接中断和它不是“T表明因为它应该是,如下面的图片:
预期: http://s33.postimg.org/oop4ua3tb/breabcrumb_funcionando_mapeamentocampo.png
破碎的链路2:http://s33.postimg.org/yjga0i7rj/breadcrumb_mapeamento_de_campo.png
这是网站地图音响乐:
<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0"
xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0 MvcSiteMapSchema.xsd">
<mvcSiteMapNode title="Home" controller="Home" action="Index">
<mvcSiteMapNode title="Processos" controller="Processo" action="Index" key="Processo">
<mvcSiteMapNode title="Alterar Processo" controller="Processo" action="Alterar" preservedRouteParameters="Id" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Importar Processos" controller="ImportarProcessos" action="ImportarProcessos">
<mvcSiteMapNode title="Histórico de Importação" controller="ImportarProcessos" action="HistoricoImportacao" />
<mvcSiteMapNode title="Histórico de Inconsistências" controller="ImportarProcessos" action="HistoricoInconsistencia" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Meus Dados" controller="Conta" action="MeusDados" />
<mvcSiteMapNode title="Parâmetros Gerais" controller="ParametroGeral" action="Index" />
<mvcSiteMapNode title="Regras de Validação" controller="RegraValidacao" action="Index" />
<mvcSiteMapNode title="Mapeamento dos Campos" controller="MapeamentoCampo" action="Index" />
<mvcSiteMapNode title="Módulos Externos" controller="ModuloExterno" action="Index" key="ModuloExternoPai">
<mvcSiteMapNode title="ConfigurarModulo" controller="ModuloExterno" action="ConfigurarModulo" preservedRouteParameters="Id" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Usuários" controller="Usuario" action="Index" key="Usuario">
<mvcSiteMapNode title="Registrar" controller="Usuario" action="Registrar" />
<mvcSiteMapNode title="AlterarUsuario" controller="Usuario" action="Editar" preservedRouteParameters="Id" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Lista Negra de Senhas" controller="ListaNegraSenha" action="Index" key="ListaNegraSenha">
<mvcSiteMapNode title="Registrar" controller="ListaNegraSenha" action="Registrar" />
<mvcSiteMapNode title="AlterarSenha" controller="ListaNegraSenha" action="Editar" preservedRouteParameters="Id" />
</mvcSiteMapNode>
<mvcSiteMapNode title="Relatório de Log" controller="RelatorioLogger" action="RelatorioLogger" />
<mvcSiteMapNode title="Sobre" controller="Home" action="Sobre" />
</mvcSiteMapNode>
</mvcSiteMap>
这是用来渲染面包屑视图代码:
<div class="breadcrumb">
<span>@LabelsResources.BreadCrumbsMessage @Html.MvcSiteMap().SiteMapPath()</span>
</div>
我们试图部署解决方案文件夹中的网站地图文件,但它并没有太多工作。
有人遇到同样的问题,并知道如何解决它?
谢谢!