473,796 Members | 2,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.microso ft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title="Home" description="Ho me 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,Li cAdmin,Customer Qualified" 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 CustomerQualifi ed
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.microso ft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title="Home" description="Ho me 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,Li cAdmin,Customer Qualified">
<siteMapNode title="Software download"
roles="admin,Li cAdmin,Customer Qualified" 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
(SoftwareDownlo ads)..? 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 1552
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
2797
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 system.mdw file, I get the "Current user account doesn't have permission to covert or enable this database".
7
2707
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 server returned an error: (500) Internal Server Error." I found a post that suggested to catch the WebException to retrieve the actual HttpWebResponse object for more information. The response returned is shown below. At first I thought this was a...
0
1213
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, when I deployed to my ISP, the security trimming does not work. Here is the relevant code. I can add users just fine, they show up in the ISP SQL Server database, and I can log on and off.
1
2360
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 using DataList to render link buttons in Tabular format.
0
1746
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 hierarchical menu in my sitemap as follows: <siteMap ...> <siteMapNode url="" title="Main Menu" description="" roles="*">
0
1152
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 pages' heirachy in the sitemap (which is the datasource for the menu). i.e. I want to have the parent item in the menu selected when a child page (based on the sitemap heirachy) is being accessed. Do I parse the sitemap file (note that I am...
13
28825
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 does not remove it's child item Menu1.Items.Remove(Menu1.FindItem("Administration/Activities"))
1
6637
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: Menu.Items.Remove(Menu.FindItem("Admin")) But how can I remove child menu items under the Admin entry in the same way?
0
800
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 , but it makes use of the Menu's ItemDataBound event. The MSDN docs don't show that the menu control throws the ItemDataBound event... but a google search shows it looks like plenty of people are using the Menu control with the ItemDataBound event....
0
9684
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10236
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10017
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7552
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6793
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.