在blazor应用程序中使用意外名称标记吗?

问题描述 投票:1回答:1

[尝试在我的blazor Web Assembly应用程序中建立用户帐户并构建身份验证元素。

但是,两个组件有错误:

Found markup element with unexpected name 'xxxxxxxxxxxxxxxx'

两个有问题的组件是AuthorizeRouteView和CascadingAuthenticationState。

我的代码:

<Router AppAssembly="@typeof(Program).Assembly">
    <Found Context="routeData">
        <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
    </Found>
    <NotFound>
        <CascadingAuthenticationState>
            <LayoutView Layout="@typeof(MainLayout)">
                <p>Sorry, there's nothing at this address.</p>
            </LayoutView>
        </CascadingAuthenticationState>
    </NotFound>
</Router>

任何线索可能有什么问题吗?

c# authentication authorization blazor
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.