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

  • Home
  • SEARCH
  • 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 202731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:18:56+00:00 2026-05-11T17:18:56+00:00

I have a list of actions on various controllers that are ‘Admin’ functions (create,

  • 0

I have a list of actions on various controllers that are ‘Admin’ functions (create, update, delete) but other actions on those same controllers that aren’t admin actions.

What I want to do is create a route that will prefix /Admin/ before all urls that call an action that have the Authorize filter attribute.

Is this even possible to do?

  • 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-11T17:18:56+00:00Added an answer on May 11, 2026 at 5:18 pm

    Yes everything is possible, but I think what you mean to say is it easy to do? And the answer is no. What you have to do is create your own route, and then add this customized route to the route mapping. This isn’t hard to do, but the problem arises in that the routes are initialized before the controller, so you will have to handle the lookup and reflection yourself to check for your criteria.

    There is an alternative option, you can try to use the ActionMethodSelectorAttribute which allows you to create custom selectors for your Action Methods and ignore ones that don’t contain the Authorize attribute. An example of this attribute being used is the ActionVerbAttribute.

    The easiest way by far is to just create a custom extension for the Html.ActionLink that does its own checks and keep it as a display only thing, and then create dual routes for the same controller in your Global.asax.

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

Sidebar

Related Questions

I met an interesting issue about C#. I have code like below. List<Func<int>> actions
I have an action called List that shows the results of a search. It
If I have List<String> text how can I create a sub-list of all continious
I have a list that I need to fill using a JSON collection of
I have a controller with two different actions, but both need this same code,
I am new to JSF 2.0 and Primefaces but have decided to create my
I have a list of actions on a menu in PyQt, one for each
I have a list of Actions (I got them form HTMLEditorKit), and I want
I have a list: <ul class=action> <li>Available actions</li> <li><a href=one.htm>One</a></li> <li><a href=two.htm>Two</a></li> </ul> And
I have a list of integers, List<Integer> and I'd like to convert all the

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.