我正在根據 Freeman 的書撰寫一個 ASP.Net Core 應用程式。在添加 Blazor 頁面時,我遇到了問題。當您嘗試轉到 Blazor 連接到的頁面時,它們上不顯示任何內容。
瀏覽器控制臺顯示以下錯誤:
錯誤:System.NullReferenceException:物件參考未設定為物件的實體。在 Microsoft.AspNetCore.Components.Routing.Router.Refresh(Boolean isNavigationIntercepted) 在 Microsoft.AspNetCore.Components.Routing.Router.SetParametersAsync(ParameterView 引數)
我的 Routed.razor 檔案:
<Router AppAssembly="@typeof(Program).Assembly"
AdditionalAssemblies="new[]{typeof(Program).Assembly}">
<Found>
<RouteView RouteData="@context" DefaultLayout="typeof(AdminLayout)" />
</Found>
<NotFound>
<h4 class="bg-danger text-white text-center p-2">
No Matching Route Found
</h4>
</NotFound>
可能是什么問題呢?
我還添加了一個指向我的專案存盤庫的鏈接:

轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/425448.html
標籤:网 asp.net-mvc asp.net 核心 西装外套 asp.net-blazor
上一篇:在JavaScript中從View轉換ViewBag.JsonData時,得到字串的長度超過了maxJsonLength屬性上設定的值
