<CascadingAuthenticationState>
    <Router AppAssembly="typeof(Startup).Assembly">
        <Found Context="routeData">
            <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
        </Found>
        <NotFound>
            <LayoutView Layout="@typeof(MainLayout)">
                @{
                    this.NavigationManager.NavigateTo("/Error/404", true);
                }
            </LayoutView>
        </NotFound>
    </Router>
</CascadingAuthenticationState>