AI Chat Web template: scaffolded Identity pages are inaccessible because App.razor applies an interactive render mode unconditionally
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- csharp
- Área
- authentication, frontend
Línea de trabajo
Comienza en App.razor de la plantilla, donde HeadOutlet y Routes reciben un modo de renderizado incondicional; el issue incluye el patrón PageRenderMode usando HttpContext.AcceptsInteractiveRouting. Reproduce creando el AI Chat Web template, haciendo scaffolding de Identity y navegando a /Account/Register. Hecho significa que las páginas de Identity se renderizan mediante SSR estático mientras el chat permanece interactivo; si los mantenedores prefieren la opción de documentación, añade una nota cerca de la guía de scaffolding de Identity.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Create a new project from the AI Chat Web App template: OpenAI, vector store, Keyless Auth
- Scaffold ASP.NET Core Identity: Add > New Scaffolded Item > Identity (all)
- Build (succeeds) and run.
- 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.razorrouting-aware, as above, or - add a short note to the template docs explaining when to add this switch (for example, before scaffolding Identity).
- Lenguaje dominante
- C#
- Estrellas
- 3.3k
- Forks
- 916
- Merge medio
- 1 d 13 h
- PR fusionados (30 d)
- 40
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/extensions
-
area-ai untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dotnet/extensions#7900 ·
Los mantenedores suelen responder en 1 día
-
Unable to obtain the UsageContent and FinishReason of response.incompletePosiblemente ocupada @jaeminbird la tomó hace 2 días. Abiertoarea-ai bug untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
dotnet/extensions#7893 ·
Los mantenedores suelen responder en 1 día
-
HTTP logging truncates catch-all route parameters in the formatted request pathPosiblemente ocupada @johnkaram02 la tomó hace 8 días. Abiertoarea-telemetry untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/extensions#7883 ·
Los mantenedores suelen responder en 1 día
-
Managed DNS resolver ignores tab-separated nameserver lines in /etc/resolv.confPosiblemente ocupada @johnkaram02 la tomó hace 8 días. Abiertoneeds-area-label untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/extensions#7881 ·
Los mantenedores suelen responder en 1 día
-
[Microsoft.Extensions.AI.OpenAI] AsOpenAIStreamingChatCompletionUpdatesAsync writes finish_reason "stop" on every chunk with a null FinishReasonPosiblemente ocupada @nurullahturkoglu la tomó hace 11 días. Abiertoarea-ai untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
dotnet/extensions#7863 ·
Los mantenedores suelen responder en 1 día
Todos los issues de dotnet/extensions
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug elsa 3 prio low
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
elsa-workflows/elsa-core#9154 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NethermindEth/nethermind#15452 ·
Los mantenedores suelen responder en 1 día
-
kind:ux size:S
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
elsa-workflows/elsa-foundation#3563 ·
Los mantenedores suelen responder en 1 día
-
请让 FPS 叠加层的字号大小可单独设置Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día