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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:17:03+00:00 2026-05-23T10:17:03+00:00

I am working on splitting an MVC3 Application into two Areas. The existing application

  • 0

I am working on splitting an MVC3 Application into two Areas. The existing application is going into one area (V1) and we are beginning a redesign in the second area (V2).

I have the Views, Models, Controllers, etc all moved into the MyApp\Areas\V1\xxx folders, and I have been able to verify that things are loading as they should for the most part. I moved all the Route registration for V1 into the V1AreaRegistration.cs file, and modified it to use context.MapRoute instead of RouteTable.Routes.MapRoute.

Looking at the routing with Phil Haack’s RouteDebugger, everything looks good – my V2 routes are resolving as they should, and the basic V1 routes work. What is NOT working are the V1 routes where I have a custom MvcRouteHandler defined such as this:

context.MapRoute(
    "MyRouteName",
    "{myRouteVal}/{controller}/{action}",
    new { area = "V1", controller = "DefaultController", action = "Index" },
    new { controller = _someRouteConstraint},
    new string[] { "My.Custom.Project.WebLibrary.Areas.V1.Controllers" },
        _myCustomRouteHandler);

If I remove the _myCustomRouteHandler from this call, it works great and sends me to the correct view under the V1 Area. With it in place, the routing seems to ignore the fact that it is registered as an Area route, and I get a yellow error page that says:

The view 'Index' or its master was not found or no view engine
supports the searched locations. The following locations were searched:
~/Views/DefaultController/Index.cshtml
~/Views/DefaultController/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
~/Views/DefaultController/Index.aspx
~/Views/DefaultController/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx

I need to be able to use the route handler – it does some validation work on the {myRoutVal} parameter and redirects to an error page if it is invalid.

Help!!

  • 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-23T10:17:04+00:00Added an answer on May 23, 2026 at 10:17 am

    Found the problem. We have an extension method for AreaRegistrationContext that you see referenced above (context.MapRoute) – in that method, I am not setting the route.DataTokens["Area"] value correctly, so when it tries to find the view, it doesn’t look in the area.

    Adding the following line to my AreaRegistrationContext extension method solved the problem:

    route.DataTokens["Area"] = context.AreaName;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on splitting out an existing, working application that I currently have
I am working on splitting a source file into tokens, particularly scanning for identifiers.
I am currently working on a project that involves splitting a url. I have
I'm working on an ASP.NET project that replaces many existing paper forms. One of
Entity Splitting: one class, two or more tables. Here is how it is done
I am working on splitting code into smaller files and refactoring it a bit.
hey guys, i'm working on a very simple breadcrumb-path solution, however i have one
Hi everyone I am working on a game and I have run into a
I'm working on an application controller for a program that is spitting text directly
Working on a project at the moment and we have to implement soft deletion

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.