Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

AI Chat Web template: scaffolded Identity pages are inaccessible because App.razor applies an interactive render mode unconditionally

Open Beginner friendly
#7,889 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@valkiara is already working on this.

Since Oct 28, 2026.

  • #7892 by @valkiara — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp

Research direction

Start in the template's App.razor, where HeadOutlet and Routes receive an unconditional render mode; the issue includes the PageRenderMode pattern using HttpContext.AcceptsInteractiveRouting. Reproduce by creating the AI Chat Web template, scaffolding Identity, and navigating to /Account/Register. Done means Identity pages render via static SSR while the chat remains interactive; if maintainers prefer the documentation option, add a note near the Identity scaffolding guidance.

Written by the indexing model from the issue text.

Description

area-ai-templates untriaged

Summary

In the AI Chat Web template, App.razor applies an interactive render mode to HeadOutlet and Routes unconditionally. As a result, pages that opt out with [ExcludeFromInteractiveRouting], such as the scaffolded ASP.NET Core Identity pages don't work. The project builds without errors, so the problem only shows up at runtime.

Environment

  • .NET SDK: 10.0.401
  • Template package: Microsoft.Extensions.AI.Templates 10.11.0-preview.3.26513.7
  • IDE: Visual Studio 26 (18.10.3)
  • OS: Windows 10 Pro

Steps to reproduce

  1. Create a new project from the AI Chat Web App template: OpenAI, vector store, Keyless Auth
  2. Scaffold ASP.NET Core Identity: Add > New Scaffolded Item > Identity (all)
  3. Build (succeeds) and run.
  4. Navigate to /Account/Register

Expected behavior

Identity pages render via static SSR so they can use HttpContext and set authentication cookies. The AI chat keeps its interactive rendering.

Actual behavior

Navigating to /Account/Register renders the template's styling but an empty content area.
No exception is thrown, there is nothing in the browser console / server log, and the build is clean.

Cause

[ExcludeFromInteractiveRouting] works as intended, but the root components still apply an interactive render mode regardless of the route:

<HeadOutlet @rendermode="@renderMode" />
<Routes @rendermode="@renderMode" />

Suggested change

Choose the render mode per request, so routes that opt out of interactive routing fall back to static SSR:

<HeadOutlet @rendermode="@PageRenderMode" />
<Routes @rendermode="@PageRenderMode" />

@code {
    [CascadingParameter]
    private HttpContext HttpContext { get; set; } = default!;

    private IComponentRenderMode? PageRenderMode =>
        HttpContext.AcceptsInteractiveRouting()
            ? new InteractiveServerRenderMode(prerender: false)
            : null;
}

This is the same pattern used when Individual Accounts authentication is selected in the standard Blazor Web App template, and it matches the workaround discussed in dotnet/aspnetcore#51170. I confirmed that with this change the AI chat still works as interactive and the Identity pages load.

Scope

I'm not proposing to include Identity in the template. Either of these would help:

  • make the template's App.razor routing-aware, as above, or
  • add a short note to the template docs explaining when to add this switch (for example, before scaffolding Identity).
Dominant language
C#
Stars
3.3k
Forks
916
Avg merge
1d 12h
Merged PRs (30d)
41

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/extensions

All issues in dotnet/extensions

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.