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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:05:29+00:00 2026-05-26T19:05:29+00:00

I created a new MVC 3 project. I ran the project and it loaded

  • 0

I created a new MVC 3 project. I ran the project and it loaded the home page. I then added a new view called “discussion.cshtml”.

I have 1 controller in the Controllers folder: HomeController

EDIT I misspelled Discussion before but it’s not misspelled in my project. the problem persists.

the new view is setup in this fashion: View -> Home -> Discussion.cshtml

I added this code to the HomeController

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

Problem: The view did not load when I hit run. I got the 404 error. The index page loads with this url “localhost:5553”. But I tried "localhost:5553/discussion.cshtml" and it can’t find it. How do I map/route to a view. I’m not sure what’s going on, I feel like I’m missing something simple.

The Global.ascx page has the usual default code if it helps:

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

namespace MvcApplication1
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit http://go.microsoft.com/?LinkId=9394801

    public class MvcApplication : System.Web.HttpApplication
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());
        }

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

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

        }

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

            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);
        }
    }
}
  • 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-26T19:05:29+00:00Added an answer on May 26, 2026 at 7:05 pm

    you can not do like localhost:5553/discussion.cshtml” on mvc.

    right click over the Discussion action and select Add View.

    if you browse localhost:5553/Home/Discussion, that will route to the view you added above.

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

Sidebar

Related Questions

I have a new MVC-2 project where I added the area 'member'. I created
I have created the following project structure for my new asp.net mvc project any
I created a new ASP.NET MVC application. The home page looks like this: I
I have a MVC project. The views are aspx. I created a view split
I have created a new ASP.NET MVC project using the MVC Project Template. According
I've just create a new MVC project, and have made no changes at all,
I have created a new ActionFilter for an ASP.NET MVC application that I'm creating.
To simplify this test case, I created a new default .NET MVC project in
I'm working in an ASP.NET MVC project where I have created a two LinqToSQL
I am completely new to ASP.Net MVC. I just created an MVC3 project in

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.