2011-09-19 5 views
1

사용자 인증시 숨길 노드가 있습니다.ASP.NET MVC SiteMap 공급자로 노드를 숨기는 방법

ASP.NET MVC SiteMap 공급자로 어떻게 할 수 있습니까?

나는 시도한다 :

http://mvcsitemap.codeplex.com/discussions/246986

하지만 난 오류가 점점 오전 : "?"

Value cannot be null. 
Parameter name: type 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentNullException: Value cannot be null. 
Parameter name: type 

Source Error: 

Line 114:    @Html.MvcSiteMap("MvcSiteMapProvider").Menu() 
+0

, 또한 어셈블리 이름을 지정하는 기억 – Pekkasso

답변

3

할 수 있습니다 있도록 지정 역할에 의해 인증 된 사용자에 대한 숨겨진 노드 = 노드에서 : visibilityProvider = "MyProject.VisibilityProviders.MyVisibilityProvider, MyProject를"

당신이 노드에 대한 가시성 제공을 설정

<mvcSiteMapNode controller="HomeController" action="Index" title="Home" roles="?"/>

관련 문제