Skip to content

Blazor apps with .NET 10 and Docker deployment do not trigger events #64366

@gavdgavd

Description

@gavdgavd

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

We are migrating all our Blazor applications from .NET 8 to .NET 10:

  • Applications are deployed on a Windows Server running WSL, using Docker containers.
  • For .NET 8, we rely on the Docker image mcr.microsoft.com/dotnet/aspnet:8.0, and for .NET 10 we use mcr.microsoft.com/dotnet/aspnet:10.0.
  • IIS 10 is configured as a reverse proxy (with ARR installed and set up) to expose all applications to the internet. Each app runs under a subdomain of our main domain, with valid certificates ensuring HTTPS connections.

Our Blazor apps have been running smoothly for months on .NET 8 without issues. The migration to .NET 10 began after the release of Visual Studio 2026 on November 12, 2025. On development machines, the updated applications run correctly, and they also work as expected when deployed to Docker and accessed via localhost.

However, when connected through IIS and subdomains, the applications load and display properly, but user interactions fail. For instance, buttons in the interface can be clicked, yet the associated events never trigger.

Expected Behavior

We expect the applications to behave identically under .NET 10 as they currently do with .NET 8. User interface interactions, such as button clicks, combo box selections, and similar events, should consistently trigger their corresponding event handlers.

Steps To Reproduce

To reproduce the issue, we created two baseline applications using Visual Studio 2026 and the Blazor Web App template:

  • Test_BlazorDN8 configured to run on .NET 8
  • Test_BlazorDN10 configured to run on .NET 10

Application Setup

  • No functional changes were made, except for an additional <p> tag on the Home page to display the .NET version.
  • Both applications were tested locally on development machines to confirm correct behavior.
  • Each app was compiled in Release mode, and the published output was copied into the corresponding Docker volumes.
  • A Docker container was created for each application using the following docker-compose.yml configuration (example shown for the .NET 8 app):
services:
  testblazorapp:
    image: mcr.microsoft.com/dotnet/aspnet:8.0
    container_name: con_TestBlazorDN8
    working_dir: /app   
    volumes:
      - /mnt/c/DockerFiles/ConfigAndDataFiles/Test_BlazorDN8/publish:/app
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
    ports:
      - "9028:8080"  # Port 9029 used for .NET 10
    command: ["dotnet", "/app/Test_BlazorApp_DotNet8.dll"]
    deploy:
      replicas: 1
      restart_policy:
        condition: unless-stopped

Localhost Testing

  • Running both applications via http://localhost:9028 (for .NET 8) or http://localhost:9029 (for .NET 10) works without issues.
  • All UI interactions, including button clicks, behave as expected.

IIS Reverse Proxy Configuration

  • IIS was configured as a reverse proxy (ARR enabled) to expose the applications over HTTPS using a subdomain.
  • Example ARR configuration for the .NET 8 app:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="ReverseProxyInboundRule_TestBlazorDN" enabled="true" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://127.0.0.1:9028/{R:1}" />
                    <serverVariables>
                        <set name="HTTP_X_Forwarded_Host" value="{HTTP_HOST}" />
                        <set name="HTTP_X_Forwarded_Proto" value="https" />
                        <set name="HTTP_X_Forwarded_Port" value="443" />
                        <set name="HTTP_X_Forwarded_For" value="{REMOTE_ADDR}" />
                        <set name="HTTP_HOST" value="{HTTP_HOST}" />
                    </serverVariables>
                </rule>
            </rules>
        </rewrite>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
</configuration>

Results

  • When accessed via the configured subdomain (https://subdomain.domain.com) and routed to the .NET 8 app, everything works correctly.
  • After updating the ARR configuration to point to the .NET 10 app (http://127.0.0.1:9029/{R:1}), the application loads and displays properly.
  • However, user interactions fail: for example, the Counter button renders but does not trigger its event.

Exceptions (if any)

  • In the .NET 10 version, the user interface displays the message: An unhandled error has occurred. Reload
  • No errors are recorded in the Docker application logs.
  • When inspecting with the browser’s Developer Tools, the Console tab shows four distinct errors.
blazor.web.j8lzlu28q6.js:1 [2025-11-14T10:43:00.816Z] Information: Normalizing '_blazor' to 'https://subdomain.domain.com/_blazor'.
blazor.web.j8lzlu28q6.js:1 [2025-11-14T10:43:01.192Z] Information: WebSocket connected to wss://subdomain.domain.com/_blazor?id=1hKPq-GMA-LbQpnCideIHg.
blazor.web.j8lzlu28q6.js:1  [2025-11-14T10:43:01.193Z] Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1006 (no reason given).'.
	log @ blazor.web.j8lzlu28q6.js:1
	_stopConnection @ blazor.web.j8lzlu28q6.js:1
	(anonymous) @ blazor.web.j8lzlu28q6.js:1
	_close @ blazor.web.j8lzlu28q6.js:1
	(anonymous) @ blazor.web.j8lzlu28q6.js:1
blazor.web.j8lzlu28q6.js:1  [2025-11-14T10:43:01.194Z] Error: Error: WebSocket closed with status code: 1006 (no reason given).
	log @ blazor.web.j8lzlu28q6.js:1
	unhandledError @ blazor.web.j8lzlu28q6.js:1
	startConnection @ blazor.web.j8lzlu28q6.js:1
	await in startConnection
	startCore @ blazor.web.j8lzlu28q6.js:1
	start @ blazor.web.j8lzlu28q6.js:1
	rr @ blazor.web.j8lzlu28q6.js:1
	await in rr
	or @ blazor.web.j8lzlu28q6.js:1
	startCircutIfNotStarted @ blazor.web.j8lzlu28q6.js:1
	resolveRendererIdForDescriptor @ blazor.web.j8lzlu28q6.js:1
	determinePendingOperation @ blazor.web.j8lzlu28q6.js:1
	refreshRootComponents @ blazor.web.j8lzlu28q6.js:1
	(anonymous) @ blazor.web.j8lzlu28q6.js:1
blazor.web.j8lzlu28q6.js:1  [2025-11-14T10:43:01.195Z] Error: Failed to start the circuit.
	log @ blazor.web.j8lzlu28q6.js:1
	rr @ blazor.web.j8lzlu28q6.js:1
	await in rr
	or @ blazor.web.j8lzlu28q6.js:1
	startCircutIfNotStarted @ blazor.web.j8lzlu28q6.js:1
	resolveRendererIdForDescriptor @ blazor.web.j8lzlu28q6.js:1
	determinePendingOperation @ blazor.web.j8lzlu28q6.js:1
	refreshRootComponents @ blazor.web.j8lzlu28q6.js:1
	(anonymous) @ blazor.web.j8lzlu28q6.js:1
blazor.web.j8lzlu28q6.js:1  Uncaught (in promise) Error: Circuit host not initialized.
    at Ho.disconnect (blazor.web.j8lzlu28q6.js:1:141177)
    at Ho.unhandledError (blazor.web.j8lzlu28q6.js:1:146461)
    at Ho.startConnection (blazor.web.j8lzlu28q6.js:1:139950)
    at async Ho.startCore (blazor.web.j8lzlu28q6.js:1:137535)
    at async rr (blazor.web.j8lzlu28q6.js:1:164409)
	disconnect @ blazor.web.j8lzlu28q6.js:1
	unhandledError @ blazor.web.j8lzlu28q6.js:1
	startConnection @ blazor.web.j8lzlu28q6.js:1
	await in startConnection
	startCore @ blazor.web.j8lzlu28q6.js:1
	start @ blazor.web.j8lzlu28q6.js:1
	rr @ blazor.web.j8lzlu28q6.js:1
	await in rr
	or @ blazor.web.j8lzlu28q6.js:1
	startCircutIfNotStarted @ blazor.web.j8lzlu28q6.js:1
	resolveRendererIdForDescriptor @ blazor.web.j8lzlu28q6.js:1
	determinePendingOperation @ blazor.web.j8lzlu28q6.js:1
	refreshRootComponents @ blazor.web.j8lzlu28q6.js:1
(anonymous) @ blazor.web.j8lzlu28q6.js:1
  • The message WebSocket closed is not observed when running the .NET 8 version.
  • In the .NET 10 version, the errors Failed to start the circuit and Circuit host not initialized appear, suggesting a potential issue with SignalR. However, the exact cause remains unidentified.

.NET Version

Version 8 and 10

Anything else?

Summary

  • Two Blazor applications were created with Visual Studio 2026: one targeting .NET 8, the other .NET 10.
  • Both applications were deployed to Windows WSL Docker containers.
  • IIS (ARR) was configured as a reverse proxy, using identical settings, to expose the apps through a subdomain.
  • The .NET 8 application runs without any issues.
  • The .NET 10 application loads correctly and displays its interface, but user interactions (e.g., button clicks, combo box selections) fail to trigger the associated events.
    Any help will be welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Blazor ♥ SignalRThis issue is related to the experience of Signal R and Blazor working togetherNeeds: Attention 👋This issue needs the attention of a contributor, typically because the OP has provided an update.area-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions