PC Review


Reply
Thread Tools Rate Thread

Confused on Menu Security Trimming

 
 
Kbalz
Guest
Posts: n/a
 
      28th Aug 2006
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..?

 
Reply With Quote
 
 
 
 
Kbalz
Guest
Posts: n/a
 
      28th Aug 2006
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!

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SiteMap and security trimming problems bogdan Microsoft ASP .NET 0 8th May 2008 01:30 AM
Menu Control, SiteMap, Security Trimming and Roles rmgalante@yahoo.com Microsoft ASP .NET 0 9th Jan 2007 07:54 PM
Create a Site Map and Enable Security Trimming John Yopp Microsoft ASP .NET 0 22nd Jun 2006 08:55 PM
Security Trimming not working 100% showing some nodes?!? funstercinsolata@gmail.com Microsoft ASP .NET 2 16th Jun 2006 10:25 AM
Security Trimming and SiteMap =?Utf-8?B?TSBIYW1tZXR0?= Microsoft ASP .NET 0 15th May 2006 02:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:11 AM.