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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:31:37+00:00 2026-05-27T21:31:37+00:00

In our ASP.NET MVC 3 intranet application, configured with WindowsTokenRoleProvider for authentication, users must

  • 0

In our ASP.NET MVC 3 intranet application, configured with WindowsTokenRoleProvider for authentication, users must be members of a certain AD group in order to access administrative content. We have solved this by applying AuthorizeAttribute to the administrative MVC controller. However, we haven’t integrated the administrative content with the GUI menu system yet.

To this end, we’d like to add links to the administrative sections to the app menu, but for authorized users only. This brings us to the question at hand, how can we in the view template (*.cshtml) render content depending on whether the user is part of the required AD group or not?

  • 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-27T21:31:37+00:00Added an answer on May 27, 2026 at 9:31 pm

    You can try something like below

                            @if (User.IsInRole("Manager"))
                        {
                              <li>@Html.ActionLink("Approvals", "TeamIndex", "Leave")</li>
                        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our ASP.NET MVC application, we automatically redirect users to a log-on page via
I'm wanting to change our c# asp.net mvc application to work with windows authentication
I'm converting one of our ASP.NET MVC application from 1.0 to 2.0. This is
I've written some custom model binders (implementing IModelBinder) in our ASP.NET MVC application. I'm
We want to split our large asp.net mvc web application into multiple Visual Studio
Hi I'm writing an ASP.Net MVC intranet application which is accessed via handhelds and
In our ASP.NET MVC application, we've noticed that we cannot have The Forbidden DOS
I'm using watin testing tool for our asp.net mvc 3 web application. The same
We're currently rewriting our organizations ASP.NET MVC application which has been written twice already.
In our asp.net mvc based web site, we want to allow users to manage

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.