SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Roles Not Working for Web.Sitemap

    I have the following section in Web.Config
    Code:
    <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
    
          <providers>
            <add name="XmlSiteMapProvider"
              description="Default SiteMap provider."
              type="System.Web.XmlSiteMapProvider "
              siteMapFile="Web.sitemap"
              securityTrimmingEnabled="true" />
    
          </providers>
        </siteMap>
    and i have following Node in Web.Sitemap
    Code:
     <siteMapNode url="~/mp/appadm/agencymgr/agencyinfo/Default.aspx" title="Agency Information"  description="Create/List/Update Agency Information" >
              <siteMapNode url="~/mp/appadm/agencymgr/agencyinfo/createagency.aspx" title="New Agency"  description="Create a New Agency" roles="Student"/>
              <siteMapNode url="~/mp/appadm/agencymgr/agencyinfo/listagency.aspx" title="List Agency "  description="List Agency" />
              <siteMapNode url="~/mp/appadm/agencymgr/agencyinfo/editagency.aspx" title="Edit Agency"  description="Update Agency Information" />
             </siteMapNode>
    I have specified that One Node (first from above 3) is for Role "Student"

    what as i am testing it with username with "Administrator" Role, it shouldn't show that Node, but its still there.

    What am i doing wrong?

    and, can i specify multiple roles for one Node?? i assume i can do it iwth comma seperated list.

    Please Help
    ---------------------------
    Errors = Improved Programming.
    My Site

  2. #2
    SitePoint Wizard
    Join Date
    Jan 2005
    Location
    Denmark
    Posts
    1,222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try adding a clear:

    Code:
    <providers>
        <clear />
        <add name="XmlSiteMapProvider"
          description="Default SiteMap provider."
          type="System.Web.XmlSiteMapProvider "
          siteMapFile="Web.sitemap"
          securityTrimmingEnabled="true" />
    </providers>
    /mouse

  3. #3
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Benjymouse View Post
    try adding a clear:

    Code:
    <providers>
        <clear />
        <add name="XmlSiteMapProvider"
          description="Default SiteMap provider."
          type="System.Web.XmlSiteMapProvider "
          siteMapFile="Web.sitemap"
          securityTrimmingEnabled="true" />
    </providers>
    After I add clear it is working perfect, thank you ben. In the first person the mistake was at the root sitemap not we need to add roles="*", then it will work perfectly.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •