473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Trouble with sitemap and roles in ASP2

Has anyone else had any trouble setting up a sitemap view to be
filtered by roles?

We've put a cust role provider in place, and we can verify that it's
only being called once for each connection, and is returning the
correct roles, but...

When we specify a role on the top sitemapnode that role seems to add to
the roles on lower level nodes, so we end up needing to put roles="*"
on the top node, but then regardless of which role we put against the
subnodes they're all visible - seemingly inheriting this from the top
one.

Examples

<sitemapnode>
....contents
</sitemapnode>

Causes nothing to be displayed (since we have trimming on, and there is
no role listed)

<sitemapnode roles="*">
<sitemapnode roles="Users"/>
</sitemapnode>

Causes the inner node to be seen regardless of whether the user
connecting has a Users role or not

Any help/suggestions would be welcome

Jan 12 '06 #1
1 1982
I have the sitemap nodes working just fine...

Here's my sitemap file:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode url="default.aspx" title="Home" description="Return to the home
page." roles="*">
<siteMapNode title="Admin" roles="Admin">
<siteMapNode url="~/Admin/Inventory.aspx" title="Inventory"
description="Add, edit, and delete inventory." roles="Admin" />
<siteMapNode url="~/Admin/AuctionManagement.aspx" title="Auction Management"
description="Create, edit, and assign inventory." roles="Admin" />
</siteMapNode>
</siteMapNode>
</siteMap>

And here's the settings in web.config:

<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<roleManager enabled="true"/>
<authentication mode="Forms"/>
<membership defaultProvider="MySqlMembershipProvider">
<providers>
<clear/>
<add name="MySqlMembershipProvider" connectionStringName="MyLocalSQLServer"
applicationName="MyAppName" type="System.Web.Security.SqlMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<add name="XmlSiteMapProvider" description="Default SiteMap provider."
type="System.Web.XmlSiteMapProvider " siteMapFile="Web.sitemap"
securityTrimmingEnabled="true"/>
</providers>
</siteMap>
--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
<ch********@microfocus.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Has anyone else had any trouble setting up a sitemap view to be
filtered by roles?

We've put a cust role provider in place, and we can verify that it's
only being called once for each connection, and is returning the
correct roles, but...

When we specify a role on the top sitemapnode that role seems to add to
the roles on lower level nodes, so we end up needing to put roles="*"
on the top node, but then regardless of which role we put against the
subnodes they're all visible - seemingly inheriting this from the top
one.

Examples

<sitemapnode>
...contents
</sitemapnode>

Causes nothing to be displayed (since we have trimming on, and there is
no role listed)

<sitemapnode roles="*">
<sitemapnode roles="Users"/>
</sitemapnode>

Causes the inner node to be seen regardless of whether the user
connecting has a Users role or not

Any help/suggestions would be welcome

Jan 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: aa | last post by:
VS2005 BETA2 in web.config it is written: <location path="Gedimai/Ataskaitos"> <system.web> <authorization> <allow roles="Dispeceriai,SDispeceriai,SVisi"/> <deny users="*"/>...
1
by: chris.rust | last post by:
Has anyone else had any trouble setting up a sitemap view to be filtered by roles? We've put a cust role provider in place, and we can verify that it's only being called once for each...
0
by: Jeevan | last post by:
We have a sitemap file( similar to below) with securitytrimming enabled in the provider declaration. There is a menu that is bound to this sitemap. <siteMapNode> <siteMapNode url="~/Url.aspx"...
0
by: Demetri | last post by:
Hello, I have built a web application with authentication modeled after the following video by Scott Guthrie: ...
0
by: rmgalante | last post by:
Hi, I've got my site configured to use a menu control, a site map, security trimming, and roles. Everything seems to be working, except I have the following problem. If I define a...
5
by: Tim Mackey | last post by:
hi, i have put my web.sitemap in /App_Data so i can edit it programatically via a web admin page, inheriting the modify permissions from the App_Data folder etc. i was hoping the provider would...
0
by: Chris | last post by:
Hi, i have a problem with sitemap combined with roles. I already posted this but i reformulated simplier: here: there are two defined users: user1 and user2 there is one role: manager user1...
1
JamieHowarth0
by: JamieHowarth0 | last post by:
Hi guys, So the ever-lasting problem has remained until now - how to create a dynamic sitemap from information stored in a database. Microsoft's MSDN magazine covered how to do this using a...
1
by: carlos | last post by:
I am using asp.net 2.0 to bind my menu controls using xml web.sitemaps. I created a sitemap for each role, and what I am trying to do is dynamically bind the menucontrol's datasource with the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.