Sitemaps and Security Trimming

Last post 10-05-2006 2:22 PM by SilverSwan. 1 replies.

Sort Posts:

  • Sitemaps and Security Trimming

    10-05-2006, 10:57 AM
    • Member
      30 point Member
    • PendragonM
    • Member since 09-27-2006, 4:09 PM
    • Posts 11

    I'm unfamiliar with the use of security trimming but I have a sitemap with roles set in the form

     <SiteMapNode url="flerble.aspx" Title="soandso" roles="Customer; User1">

    I have enabled security trimming in the Web.config file's <sitemap> element but when I run the code I have the error 'Could not find the sitemap node with URL flerble.aspx' which, if I remove the code from Web.Config I don't get and the site builds and runs perfectly (without the restriction on user roles obviously). Can anyone point out the error I've made here?

     Many thanks.

     Penny

  • Re: Sitemaps and Security Trimming

    10-05-2006, 2:22 PM
    Answer
    • Member
      208 point Member
    • SilverSwan
    • Member since 09-28-2006, 3:35 PM
    • The Netherlands
    • Posts 39

    For roles to work in your sitemap you need to set the authentication rights in the web.config file, something like this:

    <location path="Flerble.aspx">

    <system.web>

    <authorization>

    <allow roles="Customer; User1" />

    </authorization>

    </system.web>

    </location>

Page 1 of 1 (2 items)