ASP.NET Web.Sitemap - one role not being displayed in nav menu while others are

sie8ljzu

New Member
I'm working on an ASP.NET C# application that has three roles defined for various user levels within the application: "User", "Manager", and "Admin". I've completed most of the User and Admin stuff, and just added a page to the Manager section. But the "Manager" section isn't showing up in my TreeView navigation menu. I read the excellent blog article at http://blogs.ipona.com/davids/archive/2009/01/12/8554.aspx, and I appear to be following all the "rules" he defines, but it still isn't working.Here's my Web.sitemap file:\[code\]<?xml version="1.0" encoding="utf-8" ?><siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0"> <siteMapNode url="#"> <siteMapNode url="~/User/Default.aspx" roles="Admin,Manager,User" title="Home" /> <siteMapNode url="~/User/About.aspx" roles="Admin,Manager,User" title="About" description="About this application" /> <siteMapNode roles="Admin,Manager,User" title="User Functions"> <siteMapNode url="~/User/CreateNewIPR.aspx" roles="Admin,Manager,User" title="Create New IPR" description="Enter a new IPR" /> <siteMapNode url="~/User/ListIPRs.aspx" roles="Admin,Manager,User" title="List IPRs" description="List all the IPRs you have entered" /> <siteMapNode url="~/User/ViewIPRDetails.aspx" roles="Admin,Manager,User" title="View IPR Details" description="View details of an IPR" /> </siteMapNode> <siteMapNode roles="Admin" title="Admin Functions"> <siteMapNode url="~/Admin/ManageApprovalLevels.aspx" roles="Admin" title="Manage Approval Levels" description="Allows administrators to add/edit approval levels" /> <siteMapNode url="~/Admin/ManageUsers.aspx" roles="Admin" title="Manage Users & Roles" description="Allows administrators to add users to roles and add new users to the system" /> <siteMapNode url="~/Admin/ManageApprovers.aspx" roles="Admin" title="Manage Approvers" description="Allows administrators to manage approvers" /> </siteMapNode> <siteMapNode roles="Manager" title="Manager Functions"> <siteMapNode url="~/Manager/ApprovalsList.aspx" roles="Manager" title="Approve Purchase Requests" description="Allows managers to approve purchase requests" /> </siteMapNode> </siteMapNode></siteMap>\[/code\]Here's the Web.config from the "Manager" folder:\[code\]<?xml version="1.0"?><configuration> <system.web> <authorization> <allow roles="Admin,Manager" /> <deny users="*" /> </authorization> </system.web></configuration>\[/code\]And finally, here's where I define the SiteMap provider in the root Web.config:\[code\]<siteMap defaultProvider="XmlSiteMapProvider" enabled="true"> <providers> <add name="XmlSiteMapProvider" description="Default SiteMap provider" type="System.Web.XmlSiteMapProvider" siteMapFile="IPRTracker.sitemap" securityTrimmingEnabled="true" /> </providers></siteMap>\[/code\]Here's a screen capture of what I get (note that the Manager section is missing):
Nvej3.png
 
Back
Top