The node should show only for users in the AdminCalendar role

C

Cal Who

Below is part on my web.sitmap file.

What I wanted to happen is for the last node to show only for users in the
AdminCalendar role.

But it shows always.

How can I fix that?



<siteMapNode title="Home"

url="Home/Home.aspx"

description="Go to the The Home Page" >

....snip

<siteMapNode title="Calendar" roles="*"

description="Time an Location of events" >

<siteMapNode title="Monthly Calendars"

url="Calendar/EventsCalendar.aspx"

description="Calendar of events" />

....sniped more of the same...

<siteMapNode title="Locations List" roles="AdminCalendar"

url="Calendar/LocationsList.aspx"

description="Show a list of all locations" />

</siteMapNode>

....snip
 
A

Andy O'Neill

Cal Who said:
Below is part on my web.sitmap file.

What I wanted to happen is for the last node to show only for users in the
AdminCalendar role.

But it shows always.

How can I fix that?



<siteMapNode title="Home"

url="Home/Home.aspx"

description="Go to the The Home Page" >

...snip

<siteMapNode title="Calendar" roles="*"

description="Time an Location of events" >

<siteMapNode title="Monthly Calendars"

url="Calendar/EventsCalendar.aspx"

description="Calendar of events" />

...sniped more of the same...

<siteMapNode title="Locations List" roles="AdminCalendar"

url="Calendar/LocationsList.aspx"

description="Show a list of all locations" />

</siteMapNode>

...snip
Did you set securityTimmingEnabled="true" in web.config?
If you did then I would go through the msdn Walkthrough:Filtering Sete-Map
Nodes Based on Security Roles
Go through it step by step and make sure you did each of them.
 
C

Cal Who

From my web.config file



<roleManager enabled="true"/>

<siteMap defaultProvider="XmlSiteMapProvider"

enabled="true">

<providers>

<add name="XmlSiteMapProvider"

description="SiteMap provider which reads in .sitemap XML files."

type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

siteMapFile="web.sitemap"

securityTrimmingEnabled="true"/>

</providers>

</siteMap>



A difference between me and the walk through is I have

System.Web, Version=2.0.3600.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a

but they do not.



Is that significant?

I see similar text on other "type" entries in the web.config file.

Would I be better off without them?



Thanks
 
A

Andy O'Neill

I think your problem is that the admin content needs to be in a separate
folder that only admins are allowed access to via your web config.
 
C

Cal Who

I did that and it works

Thanks

Andy O'Neill said:
I think your problem is that the admin content needs to be in a separate
folder that only admins are allowed access to via your web config.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top