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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:04:18+00:00 2026-05-25T19:04:18+00:00

I am getting a 404 error when I start up my mvc 2 project.

  • 0

I am getting a 404 error when I start up my mvc 2 project. I followed the guide here: http://net.tutsplus.com/tutorials/asp-net/asp-net-from-scratch-mvc/

I haven’t set up a start page (Which I figured out to be a normal newbie mistake) and I’ve edited my global.asax class to look like below so it contains the right route. I just can’t figure out why it gives me a 404.

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

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "CreateUserController", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

        }

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterRoutes(RouteTable.Routes);
        }
    }

Here’s my CreateUserController:

public class CreateUserController : Controller
    {
        //
        // GET: /CreateUser/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult AddLinks()
        {
            return View();
        }

    }

My Project looks like this:

  • Controllers
    • CreateUserController.cs
  • Models ((This is empty for now))
  • Views
    • CreateUser
      • Index.aspx
    • Shared
      • Site.Master
  • global.asax
  • Web.Config

I am totally new at mvc 2, I’ve worked with normal web forms for about 2 months now. Let me know if you need the aspx files, but I just need it to find my controller, at this point I just want another error.

  • 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-25T19:04:19+00:00Added an answer on May 25, 2026 at 7:04 pm
    routes.MapRoute(
                    "Default", // Route name
                    "{controller}/{action}/{id}", // URL with parameters
                    new { controller = "CreateUser", action = "Index", id = UrlParameter.Optional } // Parameter defaults
                );
    

    controller should be “CreateUser” not “CreateUserController”

    you can see this hint in your file

            // GET: /CreateUser/
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting a rendering error for this form: 'NoneType' object has no attribute 'widget' http://dpaste.com/88585/
I'm just getting started with ASP.NET MVC. What is the difference between MapRoute and
I'm getting a 404 error when trying to run another web service on an
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
I am developing an ASP.NET MVC applications with MS Visual Studio 2008 SP1. My
Whenever I restrict anonymous access in my MVC site I get a 404 error:
I'm getting a strange error in my MVC site. I have an action in
I'm getting 404 errors when accessing via: http://www1.example.me/z/account/login Although these work fine: http://www1.example.me/z/index.php/account/login http://www1.example.me/z/
Getting the subdomain from a URL sounds easy at first. http://www.domain.example Scan for the
Getting the above error in following code. How to rectify it. Thanks. Please look

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.