Membership, Roles, & SiteMap

G

Guest

Hello,

I have built a web application with authentication modeled after the
following video by Scott Guthrie:

http://download.microsoft.com/downl...9-0d326f13bf18/hilo_masterpages-nav_FINAL.wmv

So I have a site map, a treeview control on a page that binds to the
sitemap. I only want certain items on there to be available for certain roles.

I have the following in my web.config:

<siteMap defaultProvider="default" enabled="true">
<providers>
<clear/>
<add name="default" siteMapFile="Web.sitemap"
type="System.Web.XmlSiteMapProvider" securityTrimmingEnabled="true"/>
</providers>
</siteMap>

I have setup the access rules via the ASP.Net configuration tool.

Here is the thing, even if I allow anonymous NOTHING shows up in the
treeview control that is bound to the sitemap. However, if I set
securityTrimmingEnabled to false then I see everything. So in my case it is
an all or nothing situation.

Roles are setup appropriately, I log into my site as with a user account I
created that is in the administrators role I created. That role has an access
rule that allows all access to the site. So I should have access to anything,
therefore the treeview control should show the items from the sitemap.

Any ideas why I loose anything from the sitemap showing in the treeview
control if I set securityTrimmingEnabled to true?
 

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

No members online now.

Forum statistics

Threads
474,053
Messages
2,570,431
Members
47,075
Latest member
TysonV438

Latest Threads

Top