472,779 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 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 1945
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: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.