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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:24:15+00:00 2026-05-12T23:24:15+00:00

Hai guys, I started a new asp.net mvc application and i followed the steps

  • 0

Hai guys,
I started a new asp.net mvc application and i followed the steps given in
http://www.packtpub.com/article/your-first-asp.net-mvc-application

when i press F5 i got the error “The incoming request does not match any route”…
Any suggestions ….

Update:

 public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            "EmployeeShow",                    // Route name
            "Employee/{firstname}",            // URL with parameters
             new
             {                             // Parameter defaults
                 controller = "EmployeeController",
                 action = "Show",
                 firstname = ""
             }
        );

    }

My controller

public class EmployeeController : Controller
{
    //
    // GET: /Employee/

    public ActionResult Show(string firstname)
    {
        if (string.IsNullOrEmpty(firstname))
        {
            ViewData["ErrorMessage"] = "No firstname provided!";
        }
        else
        {
            Employee employee = new Employee
            {
                FirstName = firstname,
                LastName = "Example",
                Email = firstname + "@example.com"
            };

            ViewData["FirstName"] = employee.FirstName;
            ViewData["LastName"] = employee.LastName;
            ViewData["Email"] = employee.Email;
        }

        return View();
    }

}
  • 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-12T23:24:15+00:00Added an answer on May 12, 2026 at 11:24 pm

    You have no “Default” route in your RegisterRoutes method and your first request WILL NOT match the route you do have as you have specifically specified the controller request …. this is normal and expected behaviour based on your configuration:

    public static void RegisterRoutes(RouteCollection routes) {
         routes.IgnoreRoute("{resource}.axd/{*pathInfo}");        
         routes.MapRoute("EmployeeShow",              
                       "{controller}/{firstname}",  // change this line from "Employee" to {controller}
                        new {controller = "Employee", action = "Show", firstname = "" });    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hai guys, I ve developed a web application using asp.net and sql server 2005
Hai guys, Any one knows what are the server requirements to host an asp.net
Hai guys, I know asp.net web forms supports event driven programming approach and it
Hai Guys, My application deals scheduled mail concept (i.e) every morning 6.00 am my
Hai guys, I want to send scheduled mail every morning from my application and
hai guys, I am new to nhibernate please suggest some article to start knowing
Hai Guys, Like DataAccessApplicationBlock for .net with sql server,Is there any thing for MySql
Hai, I wanna ask something.. I was developed code in ASP.NET and C#. on
Hai guys, Can we implement default pagination like asp:gridview for a datagridview in a
Hai guys, I ve implemented the following code in the below link: https://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/ Can

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.