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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:52:46+00:00 2026-05-15T06:52:46+00:00

Here’s the error: The incoming request does not match any route. Basically I upgraded

  • 0

Here’s the error:

The incoming request does not match any route.

Basically I upgraded from Preview 1 to Preview 2 and got rid of a load of redundant stuff in relation to areas (as described by Phil Haack). It didn’t work so I created a brand new project to check out how its dealt with in Preview 2. The file Default.aspx no longer exists which contains the following:

public void Page_Load(object sender, System.EventArgs e)
{
  // Change the current path so that the Routing handler can correctly interpret
  // the request, then restore the original path so that the OutputCache module
  // can correctly process the response (if caching is enabled).

  string originalPath = Request.Path;
  HttpContext.Current.RewritePath(Request.ApplicationPath, false);
  IHttpHandler httpHandler = new MvcHttpHandler();
  httpHandler.ProcessRequest(HttpContext.Current);
  HttpContext.Current.RewritePath(originalPath, false);
}

The error I received points to the line httpHandler.ProcessRequest(HttpContext.Current); yet in newer projects none of this even exists. To test it, I quickly deleted Default.aspx but then absolutely nothing worked, I didn’t even receive any errors. Here’s some code extracts:

Global.asax.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Intranet
{
  public class MvcApplication : System.Web.HttpApplication
  {
    public static void RegisterRoutes(RouteCollection routes)
    {
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

      AreaRegistration.RegisterAllAreas();

      routes.MapRoute(
        "Default",
        "{controller}/{action}/{id}",
        new { controller = "Home", action = "Index", id = "" }
      );
    }

    protected void App_Start()
    {
      RegisterRoutes(RouteTable.Routes);
    }
  }
}

Notice the area registration as that’s what I’m using.

Routes.cs

using System.Web.Mvc;

namespace Intranet.Areas.Accounts
{
  public class Routes : AreaRegistration
  {
    public override string AreaName
    {
      get { return "Accounts";  }
    }

    public override void RegisterArea(AreaRegistrationContext context)
    {
      context.MapRoute("Accounts_Default", "Accounts/{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" });
    }
  }
}

Check the latest docs for more info on this part. It’s to register the area. The Routes.cs files are located in the root folder of each area.

Cheers

  • 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-15T06:52:47+00:00Added an answer on May 15, 2026 at 6:52 am

    As per comment “Sorry, I was working by the example, you’re meant to use Application_Start not App_Start. I have no idea why”

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

Sidebar

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.