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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:50:26+00:00 2026-05-11T14:50:26+00:00

I noticed that the MapRoute extension includes an overload that accepts a string[] parameter

  • 0

I noticed that the MapRoute extension includes an overload that accepts a string[] parameter which is called ‘namespaces’. I read what Google had for me on it, and supposedly this is to help the framework find controllers in places it wouldn’t otherwise look.

I did some spiking, and tried putting controllers in weird locations. I put one in the Scripts folder; I even built one in a separate assembly with a separate root namespace.

Without putting anyting in the namespaces param, everything worked fine. If I put just one of the namespaces in the namespaces param, it still found all my controllers. I thought maybe it would use that array to disambiguate between similarly named controllers, but that didn’t happen either. A HomeController in MyProj.Controllers and one in SomeOtherName.Stuff would collide still.

So my question is, is that parameter deprecated? Or is it still used somehow in a way that I have yet to discern?

  • 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. 2026-05-11T14:50:27+00:00Added an answer on May 11, 2026 at 2:50 pm

    Ok, so after further testing, I figured out that it is not a filter, exactly, but it kinda is also. I gave you ‘answer’ credit even though you’re partially wrong.

    So, it does, after all, act like I thought it should which is to say it disambiguates. Basically, the logical flow is something like this:

    • Look for a namespace in the _cache that matches one in the namespaces array
      • if that’s found, look for a controller of the right name
      • — if that’s found, return it
      • — if it’s not found, return search everywhere else that it’d normally look
    • if it’s not found, search everywhere lese

    So, in short, my thought that the namespaces array would serve to disambiguate was correct. The reason my first test in that regard failed is that it only does a perfect match, and I made the mistake of using just the root n/s from the assembly (in other wordss, MyRoot instead of MyRoot.Controllers).

    What this namespaces thing allows, then, is to have a HomeController in two different namespaces and match them differently depending on the url or params.

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

Sidebar

Ask A Question

Stats

  • Questions 190k
  • Answers 191k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Instead of root.loaderInfo.loader.addEventListener(Event.COMPLETE, completeHandler); call this.loaderInfo.addEventListener(Event.COMPLETE, completeHandler); from the constructor… May 12, 2026 at 6:04 pm
  • Editorial Team
    Editorial Team added an answer Your server should take care of it. It will tell… May 12, 2026 at 6:04 pm
  • Editorial Team
    Editorial Team added an answer In the end I re-enabled address translation for instructions and… May 12, 2026 at 6:04 pm

Related Questions

I've been playing with ASP.Net MVC for a while now. I found the most
I have a login page. In my web.config I setup a loginUrl so that
I've got a simple html form with a few input boxes. When i click
I noticed that the generic IEnumerator<T> inherits from IDisposable, but the non-generic interface IEnumerator

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.