Why does ASP.NET MVC app not create the DEFAULT login and register options?

Akshay Chavan 26 Reputation points
2020-09-10T19:00:33.033+00:00

I have created an ASP.NET MVC app in VS2017 following a tutorial. I have selected individual user accounts while creating the app. However, there is no default login or register options on the top right corner. The instructor's video shows default login and register options.

Here is a screenshot of my MVC app
23808-screenshot-37.png

As you can see there is no login and register option.
Now here's a screenshot from the tutorial video showing a default login and register option:
23848-screenshot-38.png

However, I CAN successfully access the login and register option by changing my URL to http://localhost:50875/Account/Register OR http://localhost:50875/Account/login

How do I get the default login and register option?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,827 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,289 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 28,951 Reputation points Microsoft Vendor
    2020-09-11T03:25:23.89+00:00

    Hello Akshay,

    Did you change some codes which were related to the display of the Log in and Register options? Such as modifying @Html.Partial(“_LoginPartial”) in Views > Shared > _Layout.cshtml file?

    23936-layout.png

    Or changing following codes in Views > Shared > _LoginPartial.cshtml file?

    23955-loginpartial.png

    I tested on my side but failed to reproduce your issue. To narrow down this issue, please try to create a new MVC project and select “individual user accounts” option then check if this issue persists.

    If this issue persists, could you share reproduced steps and a reproduced sample(by using OneDrive) with me for further check?

    If the newly created project works well, please kindly check the codes which you modified in the project.

    Sincerely,
    Tianyu

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful