473,385 Members | 1,908 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,385 software developers and data experts.

Confused on Menu Security Trimming

I'm using xml site map to trim my security on my menus.. Its working
rather well, but I'm having this gripe about it.. Here's my psuedo
problem..

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title="Home" description="Home Secure Software Login
Sitemap" roles="*">
<siteMapNode title="Home" roles="*" url="~/default.aspx">
<siteMapNode title="Logon" roles="*" url="~/logon/default.aspx"
/>
<siteMapNode title="Software"
roles="admin,LicAdmin,CustomerQualified" url="~/software/default.aspx"
/>
</siteMapNode>
</siteMapNode>
</sitemap>

A very watered down version of my site map.. I choose to hide the first
node, so the menu looks like

Home ---
|
| ----- Logon
| ----- Software

So I want all users to see Home and Logon.. but only CustomerQualified
to see Software.. however the software node seems to be inheriting the
"*" from the Home node..

===========================================
With this sitemap, I get what I want.... almost,

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title="Home" description="Home Secure Software Login
Sitemap" roles="*">
<siteMapNode title="Home" roles="*" url="~/default.aspx">
<siteMapNode title="Logon" roles="*" url="~/logon/default.aspx"
/>
<siteMapNode title="Software
roles="admin,LicAdmin,CustomerQualified">
<siteMapNode title="Software download"
roles="admin,LicAdmin,CustomerQualified" url="~/software/default.aspx"
/>
</siteMapNode>
</siteMapNode>
</siteMapNode>
</sitemap>
This makes my menu look as such:

Home ---
|
| ----- Logon
| ----- Software ---
|
| ----- Software Downloads

But now the Software node is not shown to "*", but only the roles I
specify.. Perhaps because it has a child of its own
(SoftwareDownloads)..? Why is it acting like this, and is there any way
I can get the first sitemap to trim bottom-level child nodes different
than nodes on the same level..?

Aug 28 '06 #1
1 1516
http://aspadvice.com/blogs/dsussman/...0/16/2268.aspx

exactly what I needed.. I guess the web.config ALSO needs to be set up
(which I planned to do anyways so users could not manually type in
url's to get to these pages)..

So I understand now, thanks DS!

Aug 28 '06 #2

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

Similar topics

5
by: Jeff Amiel | last post by:
Yes, I've read the FAQ's... I'm still confused. I'm trying to help out a buddy to extract data from an .mdb file that has special 'permissions' on it. If I try to open it with the standard...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
0
by: Paul | last post by:
On my local site, I have a folder that is security trimmed, so that only members of a Role can see it after they register and log on (I set the memberships). All works fine locally. However,...
1
by: S P | last post by:
Hi All, I am developing an ASP.NET 2.0 application. I want to show the menu, depending on the user role. How can I implement that? Currently I store all the menu details in XML file and...
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...
0
by: JJ | last post by:
I have a menu that only displays the top (static) level. I want to display a menu item as 'selected' not only when it is clicked on ,but when a user is accessing any page that is below that main...
13
by: Larry Bud | last post by:
Trying to conditionally remove menu items of the 2.0 .NET menu item control and I'm stumped. This removed a root level item: Menu1.Items.Remove(Menu1.FindItem("Administration")) But this...
1
by: jobs | last post by:
I have a menu that really does not lend itself to a sitemap datasource or security trimming. In the codebehind i've been able to remove top level menu items with this code: ...
0
by: KBTibbs | last post by:
I've got a Menu control that will be used for navigation around my site. I would like to have my menu be a series of images with mouseover image swapping. I found a blog entry that seems promising...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.