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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:05:48+00:00 2026-06-18T03:05:48+00:00

I have a project with two areas. The two areas allow for different member

  • 0

I have a project with two areas. The two areas allow for different member types who don’t share any controllers or views (eg student and teacher). However they both share the root controllers for Contact and Support pages etc.

Currently I use the namespace to route within each area.

I want to do something like this but give priority to the namespaces so they don’t have conflicting controllers:

context.MapRoute(
    "Student_Default",
    "{controller}/{action}/{id}",
    new { area = "Student", controller = "Home", action = "Index", id = UrlParameter.Optional },
    new { RoleConstraint = new AuthenticationConstraint() },
    new[] { "Test.Web.Areas.Student.Controllers", "Test.Web.Controllers" }
);

Alternatively I tried using “UseNamespaceFallback” but causes a search in all areas which I don’t want.

Something else I have not tried is only registering the area when the user logs on. Would this be an acceptable approach?

Also I could just map each page but there will potentially be a lot and it would be messy to do each one.

So the question is how can I make the root controllers available to both areas without the areas being available to each other? Let me know if more information is needed, I’d be happy to give more about what I’m trying 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-06-18T03:05:49+00:00Added an answer on June 18, 2026 at 3:05 am

    After thinking about this though the weekend I decided to use “UseNamespaceFallback”. I also implemented user roles to manage which areas each user has access to. I think this is a better approach as I had read a recommendation to never use namespace as a method for authentication.

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

Sidebar

Related Questions

I have two idential controllers in two seperate areas within my project. The only
I have two areas in my project. Now when I run the program I
I have two project, one which generates some artifacts from a WSDL file using
I have a project and two files in the project are named as query-structures.h
I have a project in two parts: a Silverlight front end and a WCF
I have a project with two localizations add. English and Spanish. My app has
Suppose my solution have two project: myApp: silverlight application project: the default application App
Need to add two same name .csproj class libraries in my solution.Have two project
I have project in Dropbox and two running laptops: one with Ubuntu and one
We have one main project and two subprojects. One of the subprojects is 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.