最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

blazor - I keep getting a HTTP 404 error when trying to go to a Razor page - Stack Overflow

programmeradmin0浏览0评论

I'm working on a new Blazor app. This is the first Blazor app I've worked on since taking a Blazor course. I've added some razor pages as well. One of the pages never is found and always raises a HTTP 404 error, but the other pages are fine and can be found. Here's a code snippet from my _Layout.cshtml file:

                        <li class="nav-item">
                            <a class="nav-link active" aria-current="page" href="/TimeTrackInputTime">
                                Input Time
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link active" aria-current="page" href="/UserMaintenance">
                                User Maintenance
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link active" aria-current="page" href="/InputTimeForUser">
                                Input Time for User
                            </a>
                        </li>

Both the InputTimeForUser.cshtml and UserMaintenance.cshtml files can be found fine. However, the TimeTrackInputTime.cshtml is never found. This is so frustrating, because they are exactly similar. All 3 files begin with this:

@page 
@model FP_Timetrack_Core.Pages.TimeTrackInputTimeModel

and even if I put in

@page "/TimeTrackInputTime"

it is still not found. I've double checked the spelling, and they are identical. I've not been able to find anything exactly like this issue.

发布评论

评论列表(0)

  1. 暂无评论