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 9015269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:42:34+00:00 2026-06-16T03:42:34+00:00

i am facing strange issue in my site, i have menu, which i am

  • 0

i am facing strange issue in my site, i have menu, which i am handling with asp:menu and SiteMap, now i want to restrict menu's based on roles, so i am using securityTrimmingEnable="true" in web.config, now my problem is i have some menu items which need to enabled by 2 types of users (Administrator and Logged-In users), now in the Web.Sitemap file, i have created siteMapNode which is used in Menu, here i have added roles attribute to specify which types of users can access the menu, there is a Home menu which should be accessed by only these 2 users and no one else (i.e non anonymous), now i cannot find the way to specify multiple roles in the roles attribute, i also tried specifying * but that seems to work for non-anonymous users too, which is not my requirement, here is the sample of my web.sitemap file

 <siteMapNode roles="*">
    <siteMapNode roles="Administrator" url="~/default.aspx" title="HOME" />
 </siteMapNode>

in above case the Home menu is available to Administrator only. now if i specify * to make it available to non-administrator but logged in user, it works for non-logged in users too.

 <siteMapNode roles="*">
    <siteMapNode roles="*" url="~/default.aspx" title="HOME" />
 </siteMapNode>

is there anyway i can make the above menu available to administrator and logged in users only.
below is my web.config settings:

<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
      <providers>
        <clear/>
        <add name="XmlSiteMapProvider"
          description="Default SiteMap provider."
          type="System.Web.XmlSiteMapProvider "
          siteMapFile="Web.sitemap"
          securityTrimmingEnabled="true" />
      </providers>
    </siteMap>
  • 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-06-16T03:42:35+00:00Added an answer on June 16, 2026 at 3:42 am

    Actually there is misconception about usage of roles attribute. In your case, instead of restricting to “administrator”, it shows up for other roles as well. Menu items are restricted based on authorization settings which are specified using <location> tags in web.config file. Check out below article for more info.

    http://stweet.wordpress.com/2010/06/13/designing-the-folder-structure-of-the-asp-net-web-application/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing a strange issue with apache MINA. I have server application which
I am facing a very strange issue. I have a SharePoint webpart that displays
I'm facing kind of a strange issue which is related MD5-Hashes in Java and
I'm facing very strange issue, I'm getting JSON object from django powered site and
I seem to be facing a strange issue in SQL 2008. I have a
I am facing a strange issue with a spring project in netbeans. I have
I am facing a strange issue.I want to connect tfs server using tfs api
I'm facing a strange issue using the Criteria API. I want to dynamically add
I am facing a strange issue with JPA CascadeType.REFRESH attribute. I have a simple
I am facing a strange issue with Validators in OpenRasta.I have entry in my

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.