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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:16:35+00:00 2026-06-05T15:16:35+00:00

This should be a really, really simple one, I would assume. I’m throwing together

  • 0

This should be a really, really simple one, I would assume. I’m throwing together a quick POC project in ASP.net — something I’ve done plenty of times before. But this time, for whatever reason, the default landing page (url=localhost:portnumber doesn’t show any content at all. However, requesting localhost:portnumber/home/index works fine. So it sounds like a route registering issue, but I didn’t mess with any of that code. This issue really doesn’t even matter, as it’s just a POC and I’m fine just manually redirecting, but I just wanted to get this one answered for curiosity’s sake.

Below is some relevant code:

From global.asax:

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 }
        );
    }

and Index.cshtml for home is here, still with defaults for now:

@{
ViewBag.Title = "Home Page";
}

<h2>@ViewBag.Message</h2>
<p>
To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>.
</p>

and the index action of home controller (also left as default)

public ActionResult Index()
    {
        ViewBag.Message = "Welcome to ASP.NET MVC!";

        return View();
    }

Edit: And here is _Layout.cshtml:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript">    </script>
    <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")"     type="text/javascript"></script>
</head>
<body>
    <div class="page">
        <header>
             <div id="title">
                <h1>My MVC Application</h1>
            </div>
            <div id="logindisplay">
                @Html.Partial("_LogOnPartial")
            </div>
            <nav>
                <ul id="menu">
                     <li>@Html.ActionLink("Home", "Index", "Home")</li>
                     <li>@Html.ActionLink("About", "About", "Home")</li>
                </ul>
            </nav>
        </header>
        <section id="main">
            @RenderBody()
        </section>
        <footer>
        </footer>
    </div>
</body>
</html>

The weird thing is that almost everything is left totally default. So it seems like I could expect default behavior, right? I’m sure I’m just missing something silly, but this is frustrating me nonetheless.

Thanks in advance for the 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-06-05T15:16:36+00:00Added an answer on June 5, 2026 at 3:16 pm

    Check your project’s web settings. Alt+Enter on project file. Set it to a specific page ‘Home’ and see if that fixes it. You might be on Current Page.

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

Sidebar

Related Questions

This should be really simple, but I have tried many solutions posted on the
This seems like it should be really simple, but I'm unable to figure this
Really simple question: Am I missing something? Seems like this should be all that
Ok, this is possibly borderline-subjective, but I wonder where one would put a simple
This should be a really simple problem to solve, but for some reason Entity
this should be really simple but I can just not figure it out at
This should really be allowed - I do not understand why it is not.
This should really be easy for an experienced android programmer. Unfortunately I don't know
Overview I am using CompositeWPF to create an app using C#. This really should
This seems like it should be really easy but I couln't find an answer

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.