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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:34:45+00:00 2026-05-25T14:34:45+00:00

I’m pretty inexperienced with .net and have just started learning MVC. I’ve hit an

  • 0

I’m pretty inexperienced with .net and have just started learning MVC. I’ve hit an issue concerning multiple controllers being found:

“Multiple types were found that match the controller named ‘reviews’. This can happen if the route that services this request (‘{controller}/{action}/{id}’) does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the ‘MapRoute’ method that takes a ‘namespaces’ parameter.”

I’ve recently added a new “Admin” area to my app and within that I have a “ReviewController”. There is also a “ReviewController” within the main app folder:

ah – as a new user I can’t post an image, but basically I have a “ReviewController” in “Controllers” and in “Areas/Admin/Contollers”.

I have 2 routes set up so far:

Default route in Global.asax.vb

  Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}")

     ' MapRoute takes the following parameters, in order: 
     ' (1) Route name
     ' (2) URL with parameters
     ' (3) Parameter defaults

     routes.MapRoute( _
       "Default", _
       "{controller}/{action}/{id}", _
       New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional}, _
       {"PowellCasting/Controllers"}
     )

  End Sub

  Sub Application_Start()

    AreaRegistration.RegisterAllAreas()

    System.Data.Entity.Database.SetInitializer(New System.Data.Entity.DropCreateDatabaseIfModelChanges(Of Models.PowellCastingEntites))
    Database.SetInitializer(Of PowellCastingEntites)(New PowellCastingInitializer())

    RegisterGlobalFilters(GlobalFilters.Filters)
    RegisterRoutes(RouteTable.Routes)

    ControllerBuilder.Current.DefaultNamespaces.Add("PowellCasting/Controllers")

  End Sub

Area route in AdminAreaRegistration

Namespace PowellCasting.Areas.Admin
  Public Class AdminAreaRegistration
    Inherits AreaRegistration

    Public Overrides ReadOnly Property AreaName() As String
      Get
        Return "Admin"
      End Get
    End Property

    Public Overrides Sub RegisterArea(ByVal context As System.Web.Mvc.AreaRegistrationContext)
      context.MapRoute( _
        "Admin_default", _
        "Admin/{controller}/{action}/{id}", _
         New With {.Controller = "Dashboard", .action = "Index", .id = UrlParameter.Optional}
       )
    End Sub
  End Class
End Namespace

After reading around the issues I was having, I have added a number of bits of code:

My Admin controllers have the right namespace defined

  • Namespace PowellCasting.Areas.Admin rather than simply PowellCasting.
  • I have RegisterAllAreas set in the global
  • ControllerBuilder.Current.DefaultNamespaces.Add(“PowellCasting/Controllers”) is in place to specify the default route.

The specific problem I have now is that when I go to “/Reviews” I get the multiple controllers error shown above, specifically:

*The request for ‘reviews’ has found the following matching controllers:
PowellCasting.PowellCasting.Areas.Admin.ReviewsController

PowellCasting.PowellCasting.ReviewsController*

I’ve enabled the route debugger and that only shows one match:

ah – as a new user I can’t post an image but it shows:

Admin/{controller}/{action}/{id} as FALSE

and

{controller}/{action}/{id} as TRUE

This is as expected so I don’t know why I’m receiving the issue.

I have read about overloading the maproute method with the namespace, but couldn’t find an example in VB (loads in c#). But I tried this:

Public Overrides Sub RegisterArea(ByVal context As System.Web.Mvc.AreaRegistrationContext)
  context.MapRoute( _
      "Admin_default", _
     "Admin/{controller}/{action}/{id}", _
      New With {.Controller = "Dashboard", .action = "Index", .id = UrlParameter.Optional}, _
      vbNull,
      {"PowellCasting/Areas/Admin/Controllers"}
  )
End Sub

and

Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.IgnoreRoute("{resource}.axd/{*pathInfo}")

' MapRoute takes the following parameters, in order: 
' (1) Route name
' (2) URL with parameters
' (3) Parameter defaults

routes.MapRoute( _
    "Default", _
    "{controller}/{action}/{id}", _
    New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional}, _
    vbNull,
    {"PowellCasting/Controllers"}
)

End Sub

but without success.

I’m sure this should be straightforward and I’ve tried a number of things – it very frustrating. Any help would be really appreciated.

My first post on here – Hi! 🙂

  • 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-25T14:34:46+00:00Added an answer on May 25, 2026 at 2:34 pm

    If you read carefully the error message you are getting:

    The request for ‘reviews’ has found the following matching
    controllers: PowellCasting.PowellCasting.Areas.Admin.ReviewsController
    PowellCasting.PowellCasting.ReviewsController

    you will notice that PowellCasting is repeated twice.

    So in your main Global.asax route registration:

    routes.MapRoute( _
        "Default", _
        "{controller}/{action}/{id}", _
        New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional}, _
        vbNull,
        {"PowellCasting.Controllers"}
    )
    

    this assumes that your ReviewController in the root is defined like this:

    Namespace Controllers
        Public Class ReviewController
            Inherits System.Web.Mvc.Controller
    
            Function Index() As ActionResult
                Return View()
            End Function
        End Class
    End Namespace
    

    Notice the absence of the PowellCasting prefix in the namespace definition (that’s a VB subtility which adds it automatically, I suppose that’s the name of your application)

    and inside the AdminAreaRegistration.vb:

    context.MapRoute( _
        "Admin_default", _
        "Admin/{controller}/{action}/{id}", _
        New With {.action = "Index", .id = UrlParameter.Optional}, _
        vbNull, _
        {"PowellCasting.Areas.Admin.Controllers"}
    )
    

    which assumes that your ReviewController in this area is defined like so

    Namespace Areas.Admin.Controllers
        Public Class ReviewController
            Inherits System.Web.Mvc.Controller
    
            Function Index() As ActionResult
                Return View()
            End Function
        End Class
    End Namespace
    

    Once again notice the absence of the PowellCasting prefix in the namespace definition.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from

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.