Skip to content

<Routes @rendermode="@InteractiveServer" /> in App.razor file makes Blazor Identity components such as Login, Register Not Found #1214

@uniexpressdev

Description

@uniexpressdev

NOTE: We do not look at .zip attachments for issue investigation.

Describe the bug
Before scaffolding Blazor Identity, my Blazor Server App with Blazor.Bootstrap components works fine. After scaffolding Blazor Identity, authorization function totally doesn't work although @Attribute [Authorize] was added.

It took a while to figure out the root cause is <Routes @rendermode="@InteractiveServer" /> in App.razor file. After changed <Routes @rendermode="@InteractiveServer" /> to , authorization function starts working.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • .NET Version: [.NET 9]
  • BlazorBootstrap: [3.5.0]
  • Blazor Server: [e.g. WebAssembly, Server]
  • Blazor Interactive Render Mode: [Auto]
  • Blazor Interactivity Location: [Per page/component]

Sample code

<ImportMap />
<HeadOutlet @rendermode="@InteractiveServer" />
<script src="_framework/blazor.web.js"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ndDqU0Gzau9qJ1lfW4pNLlhNTkCfHzAVBReH9diLvGRem5+R9g2FzA8ZGN954O5Q" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.0.1/chart.umd.js" integrity="sha512-gQhCDsnnnUfaRzD8k1L5llCCV6O9HN09zClIzzeJ8OJ9MpGmIlCxm+pdCkqTwqJ4JcjbojFr79rl2F1mzcoLMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/2.2.0/chartjs-plugin-datalabels.min.js" integrity="sha512-JPcRR8yFa8mmCsfrw4TNte1ZvF1e3+1SdGMslZvmrzDYxS69J7J49vkFL8u6u8PlPJK+H3voElBtUCzaXj+6ig==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script> <script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>

GitHub repo
GitHub repo with minimal code to reproduce the issue.

Desktop (please complete the following information):

  • OS: [Windows]
  • Browser [chrome]
  • Version [11]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions