The relative page path 'About' can only be used while executing a Razor Page. Specify a

Solution:

The Problem

In one of your Razor Views, there is an anchor tag that looks something like this:

<a asp-page="About">About</a>

That syntax (without the forward slash /) will only work inside a Razor Page.

The Solution

Inside a Razor View, prefix the Page name with a forward slash / like this:

<a asp-page="/About">About</a>

Distinguishing Razor Views from Razor Pages

  • Razor Views are usually in a Views directory.
  • Razor Pages are usually in a Pages directory and have an @page directive at the top of the file.

<a class="nav-link" asp-area="Identity" asp-page="/Account/Manage/ChangePassword">

For creating Razor Page link, add asp-area and then asp-page.