Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 490671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:55:59+00:00 2026-05-13T01:55:59+00:00

I have a site with 2 sections – one for customers and one for

  • 0

I have a site with 2 sections – one for customers and one for admins, in essence.
Each section is in its own directory with its own web.config and sitemap. Security and access works fine.

When I am logged in as admin, I want to see menu items that link to the other section, however. I added links to the sitemap, e.g.:

<siteMapNode url="~/Customer/Default.aspx?3" title="Customer Site"
description="Switch to customer site" roles="Administrator"/>

This seems to have no effect, since I still see the menu item when logged in as a customer.
When I turn on security trimming, as in

<siteMap enabled="true">
  <providers>
    <add name="InternalSiteMap" type="System.Web.XmlSiteMapProvider" 
        siteMapFile="~/Internal/Internal.sitemap" />
    <add name="CustomerSiteMap" type="System.Web.XmlSiteMapProvider" 
     siteMapFile="~/Customer/Customer.sitemap" securityTrimmingEnabled="true" />
  </providers>
</siteMap>

all menu items are gone.

I actually have web.configs in both the Internal and the Customer folders, e.g. for the customer:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <authorization>
      <allow roles="Customer" />
      <deny users="*" />
    </authorization>
  </system.web>
</configuration>

and the administrator:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.web>
        <authorization>
            <allow roles="Administrator" />
            <deny users="*" />
        </authorization>
    </system.web>
</configuration>

Again, authorization works, and when I am logged in as a Customer and I click on the internal site link in the menu, I am being redirected to the login page. As an admin, I can click through to the admin site. As soon as I turn on security trimming for the sitemap provider, which is supposed to take the links that I am not authorized for off the menu, the entire menu disappears. What am I missing? Do I need to configure the asp.menu control to work together with this?

Update: I put a bounty on this question, because I still cannot get it to work. We are inclined to throwing out the menu control and writing our own, but if someone can provide a hint, that would be preferred of course.
Again – the problem is not with security – the roles and access rules work as expected. It is with the menu control and security trimming. The menu disappears alltogether when security trimming is turned on for a sitemap.

Update: Thanks for finding this blog post, Pavel. What I learned from this is that if there are sitemap entries that do not have a path and URL (which is also true for some of my submenues), the control cannot infer permissions from the settings in the web.config, and you have to specify the roles in the sitemap. Otherwise, they will be hidden by default.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T01:55:59+00:00Added an answer on May 13, 2026 at 1:55 am

    From Horizontal Menu Disappears with securityTrimmingEnabled=”true”:

    Make sure that every role has access
    to the (unused) dummy siteMapNode at
    the root by including roles=”*” in
    web.sitemap shown below:

    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap  enableLocalization="true"
         xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
        <siteMapNode url="" title="" roles="*"  description="">
          <siteMapNode url="~/default.aspx" resourceKey="siteMapHome" 
           title="Home" roles="admin,account" description="" />
    <!-----More nodes-->
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some sections on my web site where only logged in users can
I have a simple site where each page is actually a section . The
I have a Site.Master in my ASP.NET project which defines a HEAD section as
I have a section of my site where users can add addresses to their
This is what I have typed in the footer message section from the site
I would like to have sections of a site so the top menu is
I have a multi-language .Net 4 webforms site (www.example.com/en/, www.example.com/fr/ etc.) and each language
I have two separate websites on the same server. One site is a forum
I'm building a site with CakePHP which I would like to have 3 sections:
I have an ASP.net Web Site Project (.net 3.5). Currently all of the non-code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.